Re: wanted a real sort
Re: wanted a real sort
- Subject: Re: wanted a real sort
- From: Yosemite <email@hidden>
- Date: Tue, 10 Apr 2001 15:49:57 -0800
-- try this
set unsortedList to {120, 1, 119, 2, 100, 4, 100, 9}
repeat with i from 1 to ((number of items in unsortedList) - 1)
set iis to item i in unsortedList
repeat with j from (i + 1) to number of items in unsortedList
if (item i in unsortedList) > (item (j) in unsortedList) then
set temp to item i in unsortedList
set item i in unsortedList to item j in unsortedList
set item j in unsortedList to temp
end if
end repeat
set s to 1
end repeat
-- yeilds smallest to largest, to reverse change the '>' to '<' in
-- the fifth line
-- hcir
mailto:email@hidden
>
does anyone know how to place a list into order? ; 1,2,3 not 1,10,11...