comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Continuing trouble with ASCII file. Trouble with line ends
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Continuing trouble with ASCII file. Trouble with line ends [message #18495 is a reply to message #18487] Wed, 05 January 2000 00:00 Go to previous message
Peter Brooker is currently offline  Peter Brooker
Messages: 28
Registered: July 1999
Junior Member
I have determined the following information:

DOS/Windows: End of line is CR/LF
Unix: End of line is LF
Mac: End of line is CR

The ASCII file I am trying to read was produced on a MAC
so most likely the EOL character is a single CR. I will start a
new post in which I will ask for help in this specific issue.
The subject will be "Help Reading MAC ascii files in Windows"

peter brooker wrote:

> I have been having allot of trouble reading in a multiline
> ascii file to IDL. I am reading each line into a string by a
> call to readf for each line. Much thanks to Liam for
> showing me how to do that! The problem I am having has
> something to do with how the file represents a line
> end/carriage return. The line end is not being interpreted
> correctly by IDL. An example of what I am talking about is
> below.
>
> DEVICE MEAS
> J27H 0.3806
>
> In my editor (NT Notepad) there is a black vertical
> rectangle between "meas" and "J27H". This actually is the
> end of the first line. The way I want IDL to read this would
> be to read "DEVICE MEAS" on the first call to readf and then
> "J27H 0.3806" on the second call to readf. Instead it
> just reads in "DEVICE MEAS" on the first call to readf and
> then returns eof on the next call.
>
> Other editors such as MSWord recoginze the line end
> character. If I copy the above text and paste it into a word
> document it pastes in the text as
>
> DEVICE MEAS
> J27H 0.3806
>
> I can load the file also into excel. In recognizes the file
> as "Windows ANSI" and "tab delimited".
>
> I have discovered a bizarre work around. I enclosed the file
> in an email, send it, open it, and then drag it back to the
> desktop. When I open the file it appears correctly as two
> lines in the NT notepad editor. IDL can then read it in
> correctly also.
>
> Is there someway that IDL can read the file correctly
> without having to resort to the work around?
>
> thanks
>
> Peter Brooker
>
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IMDISP Update
Next Topic: Re: Recovery from PostScript file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:08:49 PDT 2025

Total time taken to generate the page: 1.11510 seconds