Re: Sort items in a list without OSAXen
Re: Sort items in a list without OSAXen
- Subject: Re: Sort items in a list without OSAXen
- From: Jon Pugh <email@hidden>
- Date: Mon, 3 Sep 2001 09:14:13 -0700
At 11:04 AM +0200 9/3/2001, Emmanuel wrote:
>
I'm sending it below as hexa.
But why hexa?
Is this (and don't you *dare* quote this):
6F6E20736F7274286C290D096966206C656E677468206F66206C20B22031207468656E2072657475
726E206C0D09736574207820746F206974656D2031206F66206C0D09736574206C6C20746F207265
7374206F66206C0D09736574206C3120746F207B7D0D09736574206C3220746F207B7D0D09726570
6561742077697468206920696E206C6C0D090969662078203C2069207468656E0D09090973657420
6C3220746F206C32202620690D0909656C73650D090909736574206C3120746F206C31202620690D
0909656E642069660D09656E64207265706561740D096966206C656E677468206F66206C31203E20
31207468656E20736574206C3120746F20736F7274286C31290D096966206C656E677468206F6620
6C32203E2031207468656E20736574206C3220746F20736F7274286C32290D0972657475726E206C
31202620782026206C320D656E6420736F72740D
*really* better than this:
on sort(l)
if length of l > 1 then return l
set x to item 1 of l
set ll to rest of l
set l1 to {}
set l2 to {}
repeat with i in ll
if x < i then
set l2 to l2 & i
else
set l1 to l1 & i
end if
end repeat
if length of l1 > 1 then set l1 to sort(l1)
if length of l2 > 1 then set l2 to sort(l2)
return l1 & x & l2
end sort
I don't think so. Adding an extra step to read a message is counter-productive.
So please, stop it before you go blind.
Jon