SORT

| コメント(0)
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
Comments are nofollow setting

コメントする

エントリー一覧

OpenID対応しています OpenIDについて
Powered by Movable Type 8.0.2
漢字イラストロジック-脳トレ京
FREE ONLINE SUDOKU