Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eof() vs. feof()
Message
 
 
To
26/04/2002 18:58:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00649845
Message ID:
00649855
Views:
22
>A friend confused eof() and feof() when reading a text file. It doesn't surprise me that the result wasn't exactly as expected, not even that no error message was issued (since both eof() and feof() accept a numerical argument).
>
>What surprised me is that the small test program made the computer hang completely! All the program did was to read and display c:\autoexec.bat line-by-line.
>
>Does any one have an idea why this insignificant confusion would cause the computer to hang completely? Not even Ctrl-Alt-Del worked.
>
>TIA, Hilmar.

First of all, the difference is significant, because using EOF() unstead of FEOF() creates endless loop, the same as
DO WHILE .T.
  FGET(lnFileHandle)
ENDDO
My guess would be that it was WIndows 9.x. I didn't have any problem to exit such loop using ESCAPE key under WIndows 2000.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform