Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Character line more than 254!
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00102865
Message ID:
00103845
Views:
24
>>
>>
>>You don't specify the way you get the line,
>>but i assume you use FGETS().
>>
>>If it's really the case, you can add a number as second parameters to
>>read lines wider than 254 chars.
>>
>>lcLine=FGETS(FileHandle,nBytes)
>>
>>;0)
>
>Gérald Santerre,
>
>I use FGETS() to retrieve the line.
>How can i get one line at a time?
>If i use nBytes it might be one or two line that it gives me.
>
>Nick,


You can use fgets with a number larger than the line actually red,
it stop reading when it reach the end of the line. (chr(13))

Use it in a loop the read the entire file:

filehandle=fopen(filename)
if filehandle > 0 && the file was open
do while !feof(filehandle)
theline=fgets(filehandle,nbytes)
SomeProcess(theline)
enddo
else
*errormessage
endif

:0)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform