Sorting algorithms/Heapsort: Difference between revisions

→‎{{header|Fortran}}: (fix overflow) Fortran allows for, but does not guarantee, short-circuit evaluation of logical operators.
m (→‎{{header|REXX}}: changed indentation, changed some comments. -- ~~~~)
(→‎{{header|Fortran}}: (fix overflow) Fortran allows for, but does not guarantee, short-circuit evaluation of logical operators.)
Line 897:
child = root * 2 + 1
if ((child + 1 < bottom) .and. (a(child) < a(child+1))) then
if (a(child) < a(child+1)) child = child + 1
end if
Anonymous user