Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print a string in different lines
Message
De
27/01/2005 12:50:33
 
 
À
26/01/2005 23:41:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Database:
Visual FoxPro
Divers
Thread ID:
00981098
Message ID:
00981283
Vues:
23
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform