Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print a string in different lines
Message
From
27/01/2005 12:50:33
 
 
To
26/01/2005 23:41:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows '98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00981098
Message ID:
00981283
Views:
26
>i have a string "the;agency;auditor" stored in a variable. i want to be able to print this string in 3 lines, ";" indicates that the next word is printed in the next line.
>
>the
>agency
>auditor
>
>how will i be able to do this? pls help.

Use ALINES() to break up the string. In VFP 6, you'll have to change the ";" to returns first:

cNewString = STRTRAN(cString, ";", CHR(13))
nCount = ALINES(aStrings, cNewString)

In VFP 7 and later, you can specify the separator right in ALINES():

nCount = ALINES(aStrings, cString, ";")

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform