RosettaCodeData/Task/Reverse-a-string/REXX/reverse-a-string-2.rexx
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

10 lines
455 B
Rexx

/*REXX program to reverse a string (and show before and after strings).*/
string1 = 'A man, a plan, a canal, Panama!'
string2 =
do j=1 for length(string1)
string2 = substr(string1,j,1)string2
end /*j*/
say ' original string: ' string1
say ' reversed string: ' string2
/*stick a fork in it, we're done.*/