Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fgets limits?
Message
De
12/04/2001 05:50:24
 
 
À
12/04/2001 05:18:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00494767
Message ID:
00494769
Vues:
15
>Hi,
>
>I discovered the following today: (VFP 6)
>I use the function fgets(nfile, nbytes). There is a limit: nbytes>16777184 will genearate an error (function argument type or value etc). When I run the app outside the development environment, the error will already occur when nbytes>8192.
>In my app I used nbytes=10000, which worked fine in VFP5.
>Is there a setting I should use to prevent the error, or is this unchangeable behaviour and must I live with lines not being longer than 8192 bytes.

VFP 6 now is limited to using files of 16MB and a maximum line length of 8192 bytes using the internal LLF functions; you might consider using the new FILETOSTR() and ALINES() functions rather than the LLF I/O commands. If you have text files with single lines in excess of 8K/line, this may provide a workaround; alternatively, you can use the Scripting.FileSystemObject to handle reading the text file line-by-line; it uses a different set of internal functions and may not run into the problem. OTOH, if you are getting CR/LF delimited text lines that long, I suspect that you have other problems related to parsing the input which are considerably more of a headache...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform