Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LineFeed and CR in string
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00632399
Message ID:
00632488
Views:
12
Edgar,

FGETS() is going to terminate at the first occurance of CR, CRLF, LF.

If you have LFCR in the file, FGETS() will return two lines.

FREAD() will be able to read these characters from the file.

it maybe a lot simpler to just

create cursor TheFile( cLine c(254) ) && adding more fields if your lines are longer than this
append from TheRealFile.txt type sdf

then scan your cursor.

Or if the file is small enough:

n = alines( laFile, filetostr( "TheRealFile.txt" ) )

>>I need to determine if my m.buffer from a low level file read contains
>
>Gregg and Garrett,
>
>? AT(CHR(13), m.buffer) && returns 0
>? AT(CHR(10), m.buffer) && returns 0
>? AT(CHR(10)+CHR(13), m.buffer) && returns 0
>? AT(CHR(13)+CHR(10), m.buffer) && returns 0
>
>I know for a fact that one exist LF or CR or BOTH exist.
>How would you interrogate for it?
>
>m.buffer = FGETS(nFinOrigin,reclen)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform