iswap Subroutine

private elemental subroutine iswap(a, b)

Swaps two integers

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: a

Integers to swap Integers to swap

integer, intent(inout) :: b

Integers to swap Integers to swap


Source Code

   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