Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FREAD() etc...
Message
From
06/08/2007 16:44:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/08/2007 13:24:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01246151
Message ID:
01246294
Views:
27
>Thanks - fgets() seems to be the way to go. How would I get it to read each line in a file to a variable? I mean a text file isn't a table and I won't be able to do a Do While !eof() skip Enddo type situation on each line...

Once again, you can read the data into an array, with FileToStr() and alines() - an extremely elegant solution. But one that will cause you trouble if you use a version of VFP older than VFP 9, AND you expect some text files to have more than 65,000 lines (about 1000 pages).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform