Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FREAD line by line
Message
 
 
To
01/03/2004 14:02:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00882109
Message ID:
00882110
Views:
26
This message has been marked as the solution to the initial question of the thread.
Tracy,

You can use FGET() which reads either to the specified len or to the end of the line (whichever occurs first).
lnFH = FOPEN(...)
...
DO WHILE NOT FEOF(lnFH)
  lcLine = FGET(lnFH, 8192)
  ...
ENDDO
FCLOSE(lnFH)
>I want to read a file line by line. I know that at the end of each line is a chr(13) followed by a chr(10). I typically read in a set number of bytes til I get to the end of a file, but in this case I want to make sure that I readin line by line. Is there an easy way to do that?
>
>TIA,
>Tracy
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform