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.

4.2.1 Explicit Shape ArraysExplicit shape arrays are defined with a specified rank, each dimension must have an upper boundspecified, and a lower bound may be specified. Each bound is explicitly defined with aspecification of the form:[lower-bound:] upper-boundAn array has a maximum of seven dimensions. The following are valid explicit array declarations:INTEGER NUM1(1,2,3)!Three dimensionsINTEGER NUM2(-12:6,100:1000) !Two dimensions with!lower and upper boundsINTEGER NUM3(0,12,12,12) !Array of size 0INTEGER NUM3(M:N,P:Q,L,99) !Array with 4 dimensions4.2.2 Assumed Shape ArraysAn assumed shape array is always a dummy argument. An assumed shape array has a specificationof the form:[lower-bound] :The number of colons (:) determines the array’s rank. An assumed shape array cannot be anALLOCATABLE or POINTER array.4.2.3 Deferred Shape ArraysAn deferred shape array is an array pointer or an allocatable array. An assumed shape array has aspecification determines the array's rank and has the following form for each dimension::For example:INTEGER, POINTER::NUM1(:,:,:,:)INTEGER, ALLOCATABLE::NUM2(:)4.2.4 Assumed Size ArraysAn assumed size array is a dummy argument with an assumed size. The array’s rank and boundsare specified with a declaration that has the following form:[explicit-shape-spec-list ,][lower-bound :]*Fortran Arrays 147

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

Saved successfully!

Ooh no, something went wrong!