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.

machines. Note that this may also affect subsequent equivalence associations to variables withinCOMMON blocks that contain records.Both character and non-character data may reside in one COMMON block. Data is aligned withinthe COMMON block in order to conform to machine-dependent alignment requirements.Blank COMMON is always saved. Blank COMMON may be data initialized.See AlsoThe SEQUENCE directive.Syntax Extension – dynamic COMMON §A dynamic, or allocatable, COMMON block is a common block whose storage is not allocateduntil an explicit ALLOCATE statement is executed. PGF77 supports dynamic COMMON blocks,while PGF95 and PGHPF do not.If the ALLOCATABLE attribute is present, all named COMMON blocks appearing in theCOMMON statement are marked as allocatable. Like a normal COMMON statement, the name ofan allocatable COMMON block may appear in more than one COMMON statement. Note that theALLOCATABLE attribute need not appear in every COMMON statement.The following restrictions apply to the dynamic COMMON statement:• Before members of an allocatable COMMON block can be referenced, the common blockmust have been explicitly allocated using the ALLOCATE statement.• The data in an allocatable common block cannot be initialized.• The memory used for an allocatable common block may be freed using the DEALLOCATEstatement.• If a SUBPROGRAM declares a COMMON block to be allocatable, all other subprogramscontaining COMMON statements of the same COMMON block must also declare theCOMMON to be allocatable.Example (dynamic COMMON)COMMON, ALLOCATABLE /ALL1/ A, B, /ALL2/ AA, BBCOMMON /STAT/ D, /ALL1/ CThis declares the following variables:Fortran Statements 67

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

Saved successfully!

Ooh no, something went wrong!