Files
l2/tests/arr_static_sort.sl

26 lines
599 B
Plaintext
Raw Normal View History

2026-02-18 16:05:48 +01:00
import ../stdlib/stdlib.sl
import ../stdlib/io.sl
import ../stdlib/arr.sl
word main
[ 4 1 3 2 ] dup arr_sort
dup 0 swap arr_get_static puti cr
dup 1 swap arr_get_static puti cr
dup 2 swap arr_get_static puti cr
dup 3 swap arr_get_static puti cr
arr_static_free
2026-02-18 16:05:48 +01:00
[ 9 5 7 ] dup arr_sorted
dup 0 swap arr_get_static puti cr
dup 1 swap arr_get_static puti cr
dup 2 swap arr_get_static puti cr
swap
dup 0 swap arr_get_static puti cr
dup 1 swap arr_get_static puti cr
dup 2 swap arr_get_static puti cr
arr_static_free
arr_static_free
2026-02-18 16:05:48 +01:00
end