>I have a string like "one, two, three" and I need it to be in the order "three, two, one".
>
>Does anybody have an efficient algorithm to do this?
I would suggest a small change to Walter's solution:
x = "one, two, three"
cnt = GETWORDCOUNT(x, ",")
y = GETWORDNUM(x, cnt, ",")
FOR nT = cnt-1 TO 1 STEP -1
y = y +"," + GETWORDNUM(x, nT, ",")
ENDFOR
? Y