Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String Size
Message
De
03/06/1997 16:03:45
 
 
À
03/06/1997 11:13:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Titre:
Divers
Thread ID:
00034254
Message ID:
00034837
Vues:
36
>>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
Fil
Voir

Click here to load this message in the networking platform