RosettaCodeData/Task/Reverse-a-string/GFA-Basic/reverse-a-string.basic
2023-07-01 13:44:08 -04: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