Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FREAD line by line
Message
 
 
À
01/03/2004 14:02:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00882109
Message ID:
00882110
Vues:
28
This message has been marked as the solution to the initial question of the thread.
Tracy,

You can use FGET() which reads either to the specified len or to the end of the line (whichever occurs first).
lnFH = FOPEN(...)
...
DO WHILE NOT FEOF(lnFH)
  lcLine = FGET(lnFH, 8192)
  ...
ENDDO
FCLOSE(lnFH)
>I want to read a file line by line. I know that at the end of each line is a chr(13) followed by a chr(10). I typically read in a set number of bytes til I get to the end of a file, but in this case I want to make sure that I readin line by line. Is there an easy way to do that?
>
>TIA,
>Tracy
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform