Swaps two integers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | a |
Integers to swap Integers to swap |
||
integer, | intent(inout) | :: | b |
Integers to swap Integers to swap |
ELEMENTAL SUBROUTINE iswap(a, b) !! Swaps two integers INTEGER, INTENT(INOUT) :: a, b !! Integers to swap !! Integers to swap INTEGER :: tmp tmp = a a = b b = tmp END SUBROUTINE iswap