Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treating lines in a string
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00807738
Message ID:
00807753
Vues:
28
You can use ALINES() function to pull text lines into array.
DIMENSION laLines[1]
ALINES(laLines, lcStr)
lcNewTextFile = "..."
lcCrLf = CHR(13) + CHR(10)
ERASE (lcNewTextFile)
FOR i=1 TO ALEN(laLines)
  STRTOFILE(laLines[i] + myvariable + lcCrLf, lcNewTextFile, .T.) 
ENDFOR
>I converted a mytext.txt to a string
>
>
> Now I want to treat my string
>
>
> My problem is that I dont know how to go to next line
>
>
>***********What I want to do is below *********
>
> Start on line1 && (of the txt)
>
> get line1
> replace line1 with (line + myvariable)
>
> Go to next line && this is my problem
>
> replace nextline with (nextline + myvariable)
>
>
> ...do until de end of the txt && (about 20,000 lines)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform