Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
→[[Forth]]
Line 127:
: bubble { addr cnt -- }
cnt
addr cnt i - cells bounds DO
i 2@ > if i 2@ swap i 2! then
Line 136:
: bubble ( addr cnt -- )
dup
2dup i - cells bounds DO
i 2@ > if i 2@ swap i 2! then
|