Closed
Description
Description
Does stdlib
need simple swap
routines as follows? (Wait for #449 )
interface swap
...
end interface swap
!! Swap the values of two variables of the same type.
!! `type & kind` description: logical, integer, real, complex, character, string_type
pure elemental subroutine swap_${t1[0]}$${k1}$(a, b)
${t1}$, intent(inout) :: a, b
${t1}$ :: c
c = a
a = b
b = c
end subroutine swap_${t1[0]}$${k1}$
call [[stdlib_math(module):swap(interface)]](a, b)
The use of swap
already in stdlib
: