Competition #1C: Reverse order of lines of a string
Posted: Tue Dec 10, 2013 12:13 am
..........
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Code: Select all
local sNoLines -- index used by function inverseLines to sort
on mouseUp
put field "source" into tData
put 0 into sNoLines -- dont worry it will count down below 0
sort lines of tData numeric by inverseLines()
put tData into field "destination"
end mouseUp
private function inverseLines
subtract 1 from sNoLines
return sNoLines
end inverseLines