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

12 lines
154 B
Plaintext

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