Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
In VFUG Tips & Tricks: FGetS tip -- unnecessary??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00005529
Message ID:
00005581
Vues:
32
>In tip #17 of the VFUG Tips and Tricks:
>"VFP has low level file functions in it's base instruction set. One of these functions is FGETS(). This function retrieves a line from a file and sets the record pointer on the next line. The catch is, it only will return a max of 254 characters."
>
>In my experience, this is only correct if you don't include the second parameter for FGets. If you include the second parameter (i.e., the number of bytes to read), it will read up to that number or until a carriage return is encountered. For example, in my experience:
>cMyString=FGets(hFileHandl,32767)
>...will read a very long line. This was true even in Foxpro 2.x.

In my experience that is not correct, or at least not with 3.0. Perhaps that has been fixed in 3.0b. No matter what I put in the second param, it would not work correctly. I do believe that the foxpro function uses the C function that that DLL calls, but it seemed to have a limitation. If not, I would be interested to know the cause....

Scot.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform