lcRgb6="RGB(1,2,3,4,5,6)" dimension a[6] a=0 for i=2 to getwordcount(m.lcRgb6, "(),") a[i]=val(getwordnum(m.lcRgb6, i, "(),")) ENDFOR DISPLAY MEMORY LIKE aif really only a string "RGB(x,y,z)" is needed and the val() above is not needed *and* lcRGB6 is always well formed,
lcRGB1 = Alltrim(Left(m.lcRGB6, at(m.lcRGB6, ",", 3)-1) + ")" ) lcRGB2 = "RGB(" + Alltrim(Subst(m.lcRGB6, at(m.lcRGB6, ",", 3)+1) )should work faster...