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

Click here to load this message in the networking platform