RosettaCodeData/Task/Reverse-a-string/FutureBasic/reverse-a-string.basic

15 lines
228 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
void local fn DoIt
CFStringRef s1 = @"asdf", s2 = @""
long index
for index = len(s1) - 1 to 0 step -1
s2 = fn StringByAppendingString( s2, mid(s1,index,1) )
next
print s1,s2
end fn
window 1
fn DoIt
HandleEvents