Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying elements of strings in simple way howto
Message
 
To
11/02/2005 15:40:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
00986136
Message ID:
00986143
Views:
34
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform