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 #18487 is a reply to message #18442] Thu, 06 January 2000 00:00 Go to previous messageGo to previous message
m218003 is currently offline  m218003
Messages: 56
Registered: August 1999
Member
In article <2107d358.8afa2864@usw-ex0110-076.remarq.com>,
peter brooker <ra5589NOraSPAM@email.sps.mot.com.invalid> writes:
> 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
>
Have you tried to save the file again using Word? If you select TEXT
formatted it should put it out ok (i.e. replace CR by CR/LF). On a Unix
system you would probably prefer a shell script using perl, sed or awk
(this allows batch processing in case you have many of those files).
I have so far only converted Windows to Unix (remove the CR from CR/LF).
It would involve a little toying around to do it for the Mac since the
Mac's line ends are not recognized as such.

Regards,
Martin


--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[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: Fri Oct 10 05:10:47 PDT 2025

Total time taken to generate the page: 0.16232 seconds