Copies an array to new memory (no pointers), The output array size will be changed to match the copy.
Example usage
use variableKind, only: r64 use m_allocate, only: allocate use m_copy, only: copy real(r64),allocatable :: a1D(:), a2D(:,:), a3D(:,:,:) real(r64),allocatable :: b1D(:), b2D(:,:), b3D(:,:,:) call allocate(a1D, 20) call allocate(a2D, [20,20]) call allocate(a3D, [20,20,20]) a1D = 1.d0 a2D = 2.d0 a3D = 3.d0 call copy(a1D, b1D) call copy(a2D, b2D) call copy(a3D, b3D) write(*,'(a)') 'a1D equals b1D: '//str(all(a1D == b1D)) write(*,'(a)') 'a2D equals b2D: '//str(all(a2D == b2D)) write(*,'(a)') 'a3D equals b3D: '//str(all(a3D == b3D)) call deallocate(a1D) call deallocate(a2D) call deallocate(a3D) call deallocate(b1D) call deallocate(b2D) call deallocate(b3D)
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(in), | allocatable | :: | this(:) | Copy this array |
|
real(kind=r32), | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
real(kind=r32), | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
real(kind=r32), | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in), | allocatable | :: | this(:) | Copy this array |
|
real(kind=r64), | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
real(kind=r64), | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
real(kind=r64), | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in), | allocatable | :: | this(:) | Copy this array |
|
integer(kind=i32), | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
integer(kind=i32), | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
integer(kind=i32), | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in), | allocatable | :: | this(:) | Copy this array |
|
integer(kind=i64), | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
integer(kind=i64), | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
integer(kind=i64), | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32), | intent(in), | allocatable | :: | this(:) | Copy this array |
|
complex(kind=r32), | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32), | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
complex(kind=r32), | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32), | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
complex(kind=r32), | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64), | intent(in), | allocatable | :: | this(:) | Copy this array |
|
complex(kind=r64), | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64), | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
complex(kind=r64), | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64), | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
complex(kind=r64), | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | allocatable | :: | this(:) | Copy this array |
|
logical, | intent(inout), | allocatable | :: | that(:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | allocatable | :: | this(:,:) | Copy this array |
|
logical, | intent(inout), | allocatable | :: | that(:,:) | Copy of this |
Interfaced with copy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | allocatable | :: | this(:,:,:) | Copy this array |
|
logical, | intent(inout), | allocatable | :: | that(:,:,:) | Copy of this |