[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Continuing trouble with ASCII file. Trouble with line ends

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


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

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?


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