RosettaCodeData/Task/Reverse-a-string/Atari-BASIC/reverse-a-string.basic
2025-02-27 18:35:13 -05:00

11 lines
154 B
Text

10 DIM S$(4)
20 S$="asdf"
30 GOSUB 100
40 PRINT S$,REV$
50 END
100 X=LEN(S$)
110 DIM REV$(X)
120 FOR I=1 TO X
130 REV$(I)=S$(X-I+1)
140 NEXT I
150 RETURN