on SORT(myList)
set myCount to count items of myList
repeat
set myFLG to false
repeat with N from 1 to myCount - 1
set buf1 to item N of myList
set buf2 to item (N + 1) of myList
if buf1 < buf2 then
set item N of myList to buf2
set item (N + 1) of myList to buf1
set myFLG to true
end if
end repeat
if myFLG is false then
exit repeat
end if
end repeat
return myList
end SORT
コメントする