EXTERNAL SUB Explode(text$,words$(),delims$) LET sz = 50 MAT redim words$(sz) DO CALL NextWord(text$,w$,delims$) IF w$ = "" then EXIT DO LET n = n+1 IF n>sz then LET sz = sz+50 MAT redim words$(sz) END IF LET words$(n) = w$ LOOP MAT redim words$(n) END SUB SUB NextWord(phrase$,word$,delims$) LET i = Ncpos(phrase$,delims$) !find start of word LET j = Cpos(phrase$,delims$,i) !find start of trailing junk IF j=0 then LET word$ = phrase$[i:maxnum] LET phrase$ = "" ELSE LET word$ = phrase$[i:j-1] LET k = Ncpos(phrase$,delims$,j) !find first char after trailing junk IF k=0 then LET phrase$="" else LET phrase$[1:k-1]="" END IF END SUB