swap_int64 Subroutine

private elemental subroutine swap_int64(a, b)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: a
integer(kind=int64), intent(inout) :: b

Contents

Source Code


Source Code

    elemental subroutine swap_int64(a, b)
        ! exchange the value of two integers a,b
        ! Input: a,b - integers to swapp (on return, a has the value of b on call and vice versa)
        integer(int64), intent(inout) :: a, b
        integer(int64) :: tmp

        tmp = a
        a = b
        b = tmp
    end subroutine swap_int64