084. DIMENSION can be used to declare several arrays of the same SHAPE#
topic: Arrays
Note
This tip is a draft1.
DIMENSION can be used to declare several arrays of the same SHAPE, which can be overridden on the same line.
real, dimension(3,4) :: x, y, z(5,6)
is legal but should be written
real, dimension(3,4) :: x, y real :: z(5,6)
for clarity.
DIMENSION can be used to declare several arrays of the same SHAPE, which can be overridden on the same line.
— FortranTip (@fortrantip) January 9, 2022
real, dimension(3,4) :: x, y, z(5,6)
is legal but should be written
real, dimension(3,4) :: x, y
real :: z(5,6)
for clarity.
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.