bswap Subroutine

private elemental subroutine bswap(a, b)

Swaps two logicals

Arguments

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

Logicals to swap Logicals to swap

logical, intent(inout) :: b

Logicals to swap Logicals to swap


Source Code

   ELEMENTAL SUBROUTINE bswap(a, b)
      !! Swaps two logicals

      LOGICAL, INTENT(INOUT)                             :: a, b
         !! Logicals to swap
         !! Logicals to swap

      LOGICAL                                            :: tmp

      tmp = a
      a = b
      b = tmp
   END SUBROUTINE bswap