RosettaCodeData/Task/Reverse-a-string/FBSL/reverse-a-string-3.fbsl

8 lines
151 B
Plaintext

Function StrRev3( $s )
FOR DIM x = 1 TO LEN(s) \ 2
PEEK(@s + LEN - x, $1)
POKE(@s + LEN - x, s{x})(@s + x - 1, PEEK)
NEXT
RETURN s
end function