Scott,
Below is some simple code I've been using forever. You can add a couple of doo-dads to correct for leading commas or to use another delimiter. Hope this helps. Note that the array must be passed by reference.
PROCEDURE sysArrayFromComma
LPARAM ArrayName,CommaList
LOCAL ln1
IF RIGHT(CommaList,1) <> ","
CommaList = CommaList + ","
ENDIF
ln1 = 0
DO WHILE LEN(CommaList) > 1
ln1 = ln1 + 1
IF ln1 > 1
DECLARE ArrayName(ln1)
ENDIF
ArrayName(ln1) = LEFT(CommaList, AT(",", CommaList)-1)
IF AT(",",CommaList) = LEN(CommaList)
CommaList = ""
ELSE
CommaList = SUBS(CommaList,AT(",",CommaList)+1)
ENDIF
ENDDO
RETURN ln1
>The title says it all. Suppose you have any of the following strings:
>
>123 12 456
>123456
>123, 32,99
> 999, 88 777777,
>,123,
>
>You and I can see through the delimiters and user input anomalies, but I'd like to have a function to pick out the data and ignore the delimiters, and put the data into an array.
>
>Thanks and Aloha!
>Scott