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

Home » Public Forums » archive » Reading ASCII
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: Reading ASCII [message #4799 is a reply to message #4706] Sun, 23 July 1995 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
dean@phobos.cira.colostate.edu wrote:
>
> I am attempting to read a ASCII text file with topography data.
> This file was created on a DOS machine and has a CR and NL character
> after each line. In my attempts to read this file, I keep getting
> the CR and NL characters which messes up my image. Is there a
> way to read this file without picking up the CR and NL with IDL?
>
> Below is the sample PRO I am working with. The ASCII file
> is located on castor.cira.colostate.edu in Dean.
>
> ... Snip
>
> FOR j = 0, ysize-1 DO BEGIN
> readU, unit, scan
> image(0,(ysize-1)-j) = scan
> ENDFOR

Pardon me if I'm being obtuse, but why are you using an unformatted read
(READU) on an ASCII file?

IDL for Windows (and maybe other versions as well) eccepts either CR+LF or
LF-only as line terminators in ASCII files.

--

============================================================ ==
Mark Hadfield hadfield@storm.greta.cri.nz
NIWA (Taihoro Nukurangi) NIWA.GRETA:HADFIELD
Wellington, New Zealand
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Question about MOMENT
Next Topic: Program code area exceeded?? 50k file

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

Current Time: Sat Oct 11 13:44:24 PDT 2025

Total time taken to generate the page: 0.88212 seconds