Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to eliminate rows in a text file
Message
De
09/01/2002 17:09:02
 
 
À
09/01/2002 15:22:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00602648
Message ID:
00602711
Vues:
19
Hello Martin.

Is there a way to eliminate rows in a text file using the low-level file functions?

As Garrett says, for VFP 6.0 or later ( untested and off the top of my head )
lcStr = FILETOSTR( 'MyTextFile' )
lnLines = ALINES( laLines, lcStr )
lcStr = ""
FOR lnLine = 1 TO lnLines
  IF < Condition where I want to keep this line >
    lcStr = lcStr + laLines[ lnLine ] + CHR( 13 ) + CHR( 10 )
  ENDIF
ENDFOR
STRTOFILE( lcStr, 'MyTextFile' )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform