Sorting algorithms/Comb sort: Difference between revisions

Line 773:
 
\ compute a new gap using scaled division
\ factored out for this example. ShouldCould be a macro or inline code.
: /1.3 ( n -- n' ) 10 13 */ ;
 
\ factored out for this example. ShouldCould be a macro or inline code.
: XCHG ( adr1 adr2 n1 n2-- ) SWAP ROT ! SWAP ! ;
 
Line 799:
SORTED @ GAP @ 0= AND \ test for complete
UNTIL
R> DROP ; \ remove 'n' from return stack </lang>
 
=={{header|Fortran}}==
Anonymous user