swap Interface

public interface swap

Generic interface for swapping values of different types.


Module Procedures

private subroutine swap_int(a, b)

Swap two integer values.

Arguments

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

First integer

integer(kind=i4), intent(inout) :: b

Second integer

private subroutine swap_real(a, b)

Swap two real (double precision) values.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: a

First real

real(kind=dp), intent(inout) :: b

Second real