Sorting algorithms/Comb sort: Difference between revisions

Content added Content deleted
(Added Forth example)
(Added some comments)
Line 140: Line 140:
</lang>
</lang>
=={{header|Forth}}==
=={{header|Forth}}==
This is an implementation of Comb sort with a different ending. Here [[Gnome sort]] is used, since it is rather small. The dataset is rather large, because otherwise the Comb sort routine would never kick in, passing control to Gnome sort almost right away.
This is an implementation of Comb sort with a different ending. Here [[Gnome sort]] is used, since it is rather small. The dataset is rather large, because otherwise the Comb sort routine would never kick in, passing control to Gnome sort almost right away. Note Comb sort can be kept much simpler this way, because Combsort11 optimizations and swapped flags can be discarded.
<lang forth>defer precedes
<lang forth>defer precedes
defer exchange
defer exchange