RosettaCodeData/Task/Reverse-a-string/BBC-BASIC/reverse-a-string.basic

10 lines
202 B
Plaintext

PRINT FNreverse("The five boxing wizards jump quickly")
END
DEF FNreverse(A$)
LOCAL B$, C%
FOR C% = LEN(A$) TO 1 STEP -1
B$ += MID$(A$,C%,1)
NEXT
= B$