RosettaCodeData/Task/Reverse-a-string/GFA-Basic/reverse-a-string.gfa
2016-12-05 23:44:36 +01:00

10 lines
186 B
Text

PRINT @reverse$("asdf")
'
FUNCTION reverse$(string$)
LOCAL result$,i%
result$=""
FOR i%=1 TO LEN(string$)
result$=MID$(string$,i%,1)+result$
NEXT i%
RETURN result$
ENDFUNC