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

Home » Public Forums » archive » Can't find the end of a text file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Can't find the end of a text file [message #83126] Wed, 06 February 2013 09:13
kisCA is currently offline  kisCA
Messages: 78
Registered: January 2011
Member
Hi there,
I got a weird problem. I am trying to read a text file with a six lines header and then a number of lines that I tried to know with:
count=0
mxnum=7000
temp=fltarr(7)
data=fltarr(7,mxnum)
while EOF(Unit) eq 0 do begin
readf,Unit,temp
data(*,count)=temp(*)
count=count+1
endwhile
In the middle of the loop, I got this error
READF: End of file encountered.

The problem is solved when I delete the last empty line of the file.
And by the way, when I read and print line by line there is an empty line every two lines that I don't see when I open the file with Notepad.

Anyone had this problem before ?

Thank you for your help
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: controling a warped image: How to do it?
Next Topic: Re: controling a warped image: How to do it?

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

Current Time: Wed Oct 08 15:05:55 PDT 2025

Total time taken to generate the page: 0.00418 seconds