Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
In VFUG Tips & Tricks: FGetS tip -- unnecessary??
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00005529
Message ID:
00005581
Views:
33
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform