>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement