iswap Subroutine

private elemental subroutine iswap(a, b)

Swaps two integers

Arguments

TypeIntentOptionalAttributesName
integer, intent(inout) :: a

Integers to swap Integers to swap

integer, intent(inout) :: b

Integers to swap Integers to swap


Contents

Source Code


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