Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LineFeed and CR in string
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00632399
Message ID:
00632488
Vues:
11
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform