Information générale
Catégorie:
Groupes d'usagers
>>What I need to measure i a character string that I read from a file.
>
>I'm therefore going to assume that you are using low-level file functions to read the string, since you didn't say anything about a .dbf.
>
>lnFileHandle=FOPEN("c:\myfile.txt")
>IF lnFileHandle >= 0
>lcString=FGETS(lnFileHandle, 10000)
>lnLength=LEN(lcString) &&lnLength has string length
>ENDIF
>
>FGETS reads from the current pointer to the first carriage return or the nuber of bytes in the second argument, whichever comes first. LEN measures the length of the string that is returned.
>
>Or am I missing the point completely? :)
You are correct I am reading a low-level file. I need to calculate in bytes each
line that i read with FGETS(lnFileHandle).
Thanks for any help!
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement