12.07.2015 Views

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

See AlsoREAD, PRINTDIMENSION 90The DIMENSION statement defines the number of dimensions in an array and the number ofelements in each dimension.SyntaxDIMENSION [::] array-name (array-spec)[, array-name (array-spec) ] ...DIMENSION array-name ([lb:]ub[,[lb:]ub]...)[,name([lb:]ub[,[lb:]ub]...)]array-namearray-speclb:ubis the symbolic name of an array.is a valid array specification, either explicit-shape, assumed-shape,deferred-shape, or assumed size (refer Fortran Arrays for details onarray specifications).is a dimension declarator specifying the bounds for a dimension (thelower bound lb and the upper bound ub). lb and ub must be integerswith ub greater than lb. The lower bound lb is optional; if it is notspecified, it is taken to be 1.DescriptionDIMENSION can be used in a subroutine to establish an argument as an array, and in this case thedeclarator can use expressions formed from integer variables and constants to establish thedimensions (adjustable arrays). Note however that these integer variables must be either argumentsor declared in COMMON; they cannot be local. In this case the function of DIMENSION ismerely to supply a mapping of the argument to the subroutine code, and not to allocate storage.The typing of the array in a DIMENSION statement is defined by the initial letter of the arrayname in the same way as variable names. The letters I,J,K,L,M and N imply that the array is ofINTEGER type and an array with a name starting with any of the letters A to H and O to Z will beof type REAL, unless overridden by an IMPLICIT or type declaration statement. Arrays mayappear in type declaration and COMMON statements but the array name can appear in only onearray declaration.DIMENSION statements must not be labeled.74 Chapter 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!