Swap two integer values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(inout) | :: | i1 | |||
real(kind=wp), | intent(inout) | :: | i2 |
pure elemental subroutine swap_real(i1,i2) implicit none real(wp),intent(inout) :: i1 real(wp),intent(inout) :: i2 real(wp) :: tmp tmp = i1 i1 = i2 i2 = tmp end subroutine swap_real