Sorting algorithms/Insertion sort: Difference between revisions

→‎{{header|CMake}}: fixed loop index bug that caused function to fail for lists with one item
(→‎{{header|REXX}}: added/changed whitespace and comments.)
(→‎{{header|CMake}}: fixed loop index bug that caused function to fail for lists with one item)
Line 342:
function(insertion_sort var)
math(EXPR last "${ARGC} - 1") # Sort ARGV[1..last].
foreach(i RANGE 21 ${last})
# Extend the sorted area to ARGV[1..i].
set(b ${i})
Anonymous user