Sorting algorithms/Insertion sort: Difference between revisions

m
→‎{{header|Fortran}}: classic mistake with non-short-circuit logical operators
m (→‎{{header|Fortran}}: classic mistake with non-short-circuit logical operators)
Line 1,157:
 
=={{header|Fortran}}==
{{incorrect|Fortran|The .AND. operator is not "short-circuit", hence the test "a(j)>temp" may crash the program}}
{{works with|Fortran|90 and later}}
<lang fortran>PURE SUBROUTINE Insertion_Sort(a)
Line 1,183 ⟶ 1,184:
 
=== Alternate Fortran 77 version ===
{{incorrect|Fortran|The .AND. operator is not "short-circuit", hence the test "A(J).LE.X" may crash the program}}
<lang fortran> SUBROUTINE SORT(N,A)
IMPLICIT NONE
1,336

edits