Optional parameters: Difference between revisions

m
→‎{{header|Fortran}}: a little enhancement
(fortran)
m (→‎{{header|Fortran}}: a little enhancement)
Line 93:
! in another row; ... let us suppose rowA and rowB are
! the two rows we are considering
ea = get_element(rowA, the_column)
eb = get_element(rowB, the_column)
if ( present(ordering) ) then
if ( .not. reversing ) then
if ( ordering(get_element(rowAea, the_column), get_element(rowB, the_column)eb) > 0 ) then
! swap the rowA with the rowB
end if
else ! < instead of >
if ( ordering(get_element(rowAea, the_column), get_element(rowB, the_column)eb) < 0 ) then
! swap the rowA with the rowB
end if
Line 105 ⟶ 107:
else
if ( .not. reversing ) then
if ( lexinternal(get_element(rowAea, the_column), get_element(rowB, the_column)eb) > 0 ) then
! swap the rowA with the rowB
end if
else ! < instead of >
if ( lexinternal(get_element(rowAea, the_column), get_element(rowB, the_column)eb) < 0 ) then
! swap the rowA with the rowB
end if