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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ALLOCATE 90The ALLOCATE statement is an extension to FORTRAN 77 but is part of the Fortran 90/95standard. It allocates storage for each pointer-based variable and allocatable array which appearsin the statement. ALLOCATE also declares storage for deferred-shape arrays.SyntaxALLOCATE ( allocation-list [ , STAT= var ] )allocation-list is:allocate-object [ allocate-shape-spec-list ]allocate-object is:variable-namestructure-componentallocate-shape-spec-list is:[ allocate-lower-bound : ] allocate-upper-boundvarnameis an integer variable, integer array element or an integer member of aSTRUCTURE (that is, an integer scalar memory reference). Thisvariable is assigned a value depending on the success of theALLOCATE statement.is a pointer-based variable or name of an allocatable COMMONenclosed in slashes.DescriptionFor a pointer-based variable, its associated pointer variable is defined with the address of theallocated memory area. If the specifier STAT= is present, successful execution of the ALLOCATEstatement causes the status variable to be defined with a value of zero. If an error occurs duringexecution of the statement and the specifier STAT= is present, the status variable is defined tohave the integer value one. If an error occurs and the specifier STAT= is not present, programexecution is terminated.A dynamic, or allocatable COMMON block is a common block whose storage is not allocateduntil an explicit ALLOCATE statement is executed. Note: Allocatable COMMON blocks are anextension to FORTRAN 77 supported only by PGF77 compiler, and not by the PGF95 or PGHPFcompilers.56 Chapter 3

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

Saved successfully!

Ooh no, something went wrong!