Subj : File.readln() not returning string occasionally
To : Nightfox
From : Digital Man
Date : Mon Aug 17 2009 01:54 pm
Re: File.readln() not returning string occasionally
By: Nightfox to Digital Man on Mon Aug 17 2009 11:47 am
> Re: File.readln() not returning string occasionally
> By: Digital Man to Nightfox on Mon Aug 17 2009 00:44:26
>
> > > File.readln() returns undefined when end of file is reached.
>
> What's weird is that what I was seeing doesn't seem to be consistent.
> There were times when I could read an entire text file without problems,
> and then when reading one particular text file, the script exited with the
> error that my file line variable had no properties. With File.readln()
> returning undefined when the end of file is reached, wouldn't a script exit
> with that error every time if it doesn't check the type of what readln()
> returned?
>
> I also had my file reading code in a loop that checked File's eof property
> (i.e., while (!inFile.eof)).
That might depend on the file being read.
digital man
Snapple "Real Fact" #172:
The eye makes movements 50 times every second.
---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net