i wrote a super-simple number sorter, but i want something more. how
to sort numbers with 5 digits like (4320,745,321)?
--only 1 digit!
set nr_ls to {3, 6, 3, 8, 1, 5}
set nw_ls to {}
repeat with i in nr_ls
set i to i as number
if nw_ls is {} then
copy i to end of nw_ls
else
set ref_of to last item of nw_ls
if i < ref_of then
copy i to end of nw_ls
else if i > ref_of then
copy i to beginning of nw_ls
end if
end if
end repeat
return nw_ls
>> Stay informed about: number sort