Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement