General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only