diff options
author | Lua Team <team@lua.org> | 2000-11-06 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2000-11-06 12:00:00 +0000 |
commit | 8cb71cb5548e3138e5d4e4744f52c79d9fafb116 (patch) | |
tree | 25859eb162c67eafc46866e0ec3a9a7ebf93157a /test/sort.lua | |
parent | b7610da5fed99f59ac73ae452da8839a0f2c1bda (diff) | |
download | lua-github-4.0.tar.gz |
Lua 4.04.0
Diffstat (limited to 'test/sort.lua')
-rw-r--r-- | test/sort.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/sort.lua b/test/sort.lua index 41473f4a..1d50ad47 100644 --- a/test/sort.lua +++ b/test/sort.lua @@ -1,3 +1,6 @@ +-- two implementations of a sort function +-- this is an example only. Lua has now a built-in function "sort" + -- extracted from Programming Pearls, page 110 function qsort(x,l,u,f) if l<u then @@ -57,7 +60,7 @@ function testsorts(x) show("after quicksort again",x) end --- array t be sorted +-- array to be sorted x={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"} testsorts(x) |