RosettaCodeData/Task/Reverse-words-in-a-string/LiveCode/reverse-words-in-a-string.l...

8 lines
232 B
Plaintext

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