Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Eof() vs. feof()
Message
 
 
À
26/04/2002 18:58:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00649845
Message ID:
00649855
Vues:
23
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform