Reallocate an allocatable array
Example usage
use variableKind use use m_reallocate real(r64),allocatable :: a1D(:), a2D(:,:), a3D(:,:,:) allocate(a1D(5)) allocate(a2D(5,5)) allocate(a3D(5,5,5)) write(*,'(a)') 'Shape of a3D is [5,5,5]? '//all(shape(a3D) == [5,5,5]) call reallocate(a1D, 20) call reallocate(a2D, [20,20]) call reallocate(a3D, [20,20,20]) write(*,'(a)') 'Shape of a3D is [20,20,20]? '//all(shape(a3D) == [20,20,20])
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32), | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32), | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r32), | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64), | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64), | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=r64), | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout), | allocatable | :: | this(:) | 1D array |
|
integer(kind=i32), | intent(in) | :: | n | New allocation size |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout), | allocatable | :: | this(:,:) | 2D array |
|
integer(kind=i32), | intent(in) | :: | n(2) | New allocation shape |
Interfaced with reallocate()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout), | allocatable | :: | this(:,:,:) | 3D array |
|
integer(kind=i32), | intent(in) | :: | n(3) | New allocation shape |