>Is there a SPLIT function like VB has to parse a string by a delimiter passed to the function and return an array? I can certainly write my own but it seems there should be one already avaliable just can't put my finger on it.
>
>Thanks in advance.
>
Tommy,
You'll have to sorta roll you own. I say "sorta" because foxtools has two functions (Words() and WordNum()) that can help simplify the process. The following example demonstrates. It assumes that Foxtools is already loaded
FUNCTION VFPSplit
LPARAMETERS tcString, tcDelimeters, taArray
EXTERNAL ARRAY taArray
LOCAL lni, lnlast
lnlast = Words(tcString, tcDelimeters)
IF lnlast > 0
DIMENSION taArray[lnlast]
FOR lni = 1 TO lnlast
taArray[lni] = WordNum(tcString, lni, tcDelimeters)
NEXT
ENDIF
RETURN lnlast
ENDFUNC
In the example above, the array must be passed by reference.
George
Ubi caritas et amor, deus ibi est