Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treating lines in a string
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00807738
Message ID:
00807753
Views:
26
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform