Swap arrays a
and b
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=double), | intent(inout), | dimension(:) | :: | a | ||
real(kind=double), | intent(inout), | dimension(:) | :: | b |
subroutine swap(a,b)
!+Swap arrays `a` and `b`
real(double), dimension(:), intent(INOUT) :: a,b
real(double), dimension(size(a)) :: dum
dum=a
a=b
b=dum
end subroutine swap