Basic sorting problem

Richmond Mathewson geradamas at yahoo.com
Wed May 7 08:09:52 EDT 2008


Seems rather complicated!

I did this:

on mouseUp
  put 1 into KK
  repeat until line KK of fld "fIN" is empty
  put the number of words of line KK of fld "fIN" &&
line KK of fld "fIN" into line KK of fld "fOUT"
  put KK + 1 into KK
end repeat
sort lines of fld "fOUT"
put 1 into CC
repeat until line CC of fld "fOUT" is empty
  put 1 into XX
  repeat until char XX of line CC of fld "fOUT" is " "
    put the number of chars of line CC of fld "fOUT"
into NC
    put char 2 to NC of line CC of fld "fOUT" into
line CC of fld "fOUT"
  end repeat
  put CC + 1 into CC
end repeat
end mouseUp

it took me 15 minutes.

look at "Sentence Sorter" in RevOnline (under
'Richmond')

sincerely, Richmond Mathewson

____________________________________________________________

A Thorn in the flesh is better than a failed Systems Development Life Cycle.
____________________________________________________________


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html



More information about the use-livecode mailing list