Swaps two logicals
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | a |
Logicals to swap Logicals to swap |
||
logical, | intent(inout) | :: | b |
Logicals to swap Logicals to swap |
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