Anonymous user
Reverse words in a string: Difference between revisions
→{{header|LiveScript}}
(CoffeeScript version) |
|||
Line 1,150:
----------------------- Robert Frost</pre>
=={{header|LiveCode}}==
The input text has been entered into the contents of a text field called "Fieldtxt", add a button and put the following in its mouseUp
<lang LiveCode>repeat for each line txtln in fld "Fieldtxt"
repeat with i = the number of words of txtln down to 1
put word i of txtln & space after txtrev
end repeat
put cr after txtrev -- preserve line
end repeat
put txtrev</lang>
=={{header|LiveScript}}==
|