Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FREAD() etc...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01246151
Message ID:
01246202
Views:
26
>>>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...
>>Hi John
>>Why not
>>
>>CLEAR
>>lcTxtFile = GETFILE([txt],[Your txt])
>>IF NOT EMPTY(lcTxtFile)
>>   ALINES(myarr,FILETOSTR(lcTxtFile))
>>   DISPLAY MEMORY LIKE myarr
>>ENDIF
>>
>
>:-)
>Because all depends how big is the file and what version of VFP John used.

Without testing I would bet it would be the slowest solution for big files. Actually, it would be nice to compare 3 offered solutions and know for sure which one is the quickest.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform