Allocate array according to shape_spec. Possibly assign array from source.
Note
this does not fully replace Fortran RESHAPE intrinsic since source and target array must have same rank.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real_8), | intent(out), | DIMENSION(:,:), ALLOCATABLE | :: | array |
target array. |
|
integer, | intent(in), | optional, | DIMENSION(2) | :: | shape_spec |
shape of array to be allocated. If shape is not specified, it is derived from source. |
real(kind=real_8), | intent(in), | optional, | DIMENSION(:,:) | :: | source |
source array to be copied to target array, must have same rank as target array. |
integer, | intent(in), | optional, | DIMENSION(2) | :: | order |
in which order to copy source to array (same convention as RESHAPE intrinsic). |