Swap the values of two variables
Example usage
use variableKind use m_strings, only: str use m_swap, only: swap real(r64) :: a,b a = 10.d0 b = 100.d0 call swap(a,b) write(*,'(a)') 'Values were swapped? '//str(a == 100.d0 .and. b == 10.d0)
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(inout) | :: | this | |||
integer(kind=i32), | intent(inout) | :: | that |
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(inout) | :: | this | |||
integer(kind=i64), | intent(inout) | :: | that |
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(inout) | :: | this | |||
real(kind=r32), | intent(inout) | :: | that |
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(inout) | :: | this | |||
real(kind=r64), | intent(inout) | :: | that |
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32) | :: | this | ||||
complex(kind=r32) | :: | that |
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64) | :: | this | ||||
complex(kind=r64) | :: | that |
Interfaced with swap()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical | :: | this | ||||
logical | :: | that |