Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying elements of strings in simple way howto
Message
 
À
11/02/2005 15:40:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
00986136
Message ID:
00986143
Vues:
35
Thanks Tore, I thought there was a special foxpro function that splits a string in an array.

>Not much shorter, but a little:
>cName = "Zakaria"
>DIMENSION aLetters(LEN(cName))
>FOR i=1 to LEN(cName)
>  aLetters[i] = SUBSTR(cName,i,1)
>? aLetters[i] +  CHR(13)
>ENDFOR
>
>>Hello All,
>>
>>I want to split a string in its distinct elements , i have the next code
>>
>>
>>cName = "Zakaria"
>>DIMENSION aLetters(LEN(cName))
>>i = 0
>>FOR EACH cLetter IN aLetters
>>	i = i + 1
>>	aLetters[i] = SUBSTR(cName,i,1)
>>	? aLetters[i] +  CHR(13)
>>ENDFOR
>>
>>
>>
>>
>>I'm sure this can be done simpler. Could you explain me how?
>>
>>Thanks.
Zakaria al Azhar
My blog on Actuaris.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform