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

8 lines
128 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
function reverse$(a$)
b$ = ""
for i = 1 to len(a$)
b$ = mid$(a$, i, 1) + b$
next i
reverse$ = b$
end function