Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Split, Conquer and Destroy!!
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01006370
Message ID:
01007692
Views:
18
Hi Tommy,

Thre are many ways to do this; here is one of them.

lcstring = '510,832,9953,21,3348'

You could use the GETWORDNUM() function and specify that the "," is the delimiter. For example here is how you get the values one at a time.

'510' = GETWORDNUM(lcstring,1,',')
'832' = GETWORDNUM(lcstring,2,',')

Here is some code to get them all and put them into an array

local lnwct
lnwct = GETWORDCOUNT(lcstring,',')
dimension myarray[lnwct]
for i = 1 to lnwct
myarray[i] = GETWORDNUM(lcstring,i,',')
endfor
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform