There is a lesson called "Reversing text" in the LiveCode developers area. It's here: http://lessons.runrev.com/s/lessons/m/2 ... rsing-text
When I follow this lesson, I don't get at all the expected result, and I don't understand why... The reverse text isn't done.
I have the fields "Reversed Text" and "Answer", and a button with the code from the lesson:
Code: Select all
on mouseUp
get reversed("A man, a canal, Panama")
put reversed(it) into field "Reversed Text"
answer reversed(field "Answer")
end mouseUp
Code: Select all
function reversed pString
local tReversedString
repeat with tChar = the length of pString down to 1
put char tChar of pString after tReversedString
end repeat
return tReversedString
end reversed
Note: I use LC 6.5.2
Thanks in advance.