--- "brucexs" <[EMAIL PROTECTED]> wrote:
> > Local Handle = File.Open(ScriptFolder ++ "\Test1.txt", "R")
> > For(Not(File.EOF(Handle)))
> >     Local Output = Output ++ File.ReadLine(Handle)
> > EndFor
> >e> Test2.txt contains the number 0 for some unknown reason.
> > 
> > Is there any reason why this is happening?
> 
> 
> file.eof checks whether _previous_ read, NOT _next_ read,
> will produce eof, so you are reading your last readline can
> process a line when there is none there.  See eg in file.txt
> for right way to use file.eof.

Hi Bruce. Though I'm not Alex I'm sure he's well aware of this.

IMHO, the real problem is the generation of "0".
Apparently, this may be thought of as easily avoidable.
On the contrary, however, this may become really serious
for the users of "vim" which automatically append CR-LF
at the trail of the line ever without <Enter> when exit.
Even worse, some "vim" users might not understand what the
real problem is. I myself, as a too got-used user of "vim",
had a difficulty to realize how file.eof works.

I thought that this might be related with the problem,
""==0 and/or " "==0 that you mentioned previously.
If I'm wrong, please consider to fix it too.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->

****  EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to