Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=SP), | intent(inout) | :: | a | |||
real(kind=SP), | intent(inout) | :: | b | |||
logical(kind=LGT), | intent(in) | :: | mask |
SUBROUTINE masked_swap_rs(a,b,mask)
REAL(SP), INTENT(INOUT) :: a,b
LOGICAL(LGT), INTENT(IN) :: mask
REAL(SP) :: swp
if (mask) then
swp=a
a=b
b=swp
end if
END SUBROUTINE masked_swap_rs