06.03.2014 Views

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

SHOW MORE
SHOW LESS

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

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

5 <strong>Intel</strong> <strong>Fortran</strong> <strong>Language</strong> <strong>Reference</strong><br />

Some variables cannot be specified as AUTOMATIC or STATIC. The following table shows these<br />

restrictions:<br />

Variable AUTOMATIC STATIC<br />

Dummy argument No No<br />

Automatic object No No<br />

Common block item No Yes<br />

Use-associated item No No<br />

Function result No No<br />

Component of a derived type No No<br />

A variable can be specified with both the STATIC and SAVE attributes.<br />

If a variable is in a module’s outer scope, it can be specified as STATIC, but not as AUTOMATIC.<br />

Examples<br />

The following examples show type declaration statements specifying the AUTOMATIC and<br />

STATIC attributes:<br />

REAL, AUTOMATIC :: A, B, C<br />

INTEGER, STATIC :: ARRAY_A<br />

The following example shows an AUTOMATIC and a STATIC statement:<br />

...<br />

CONTAINS<br />

INTEGER FUNCTION REDO_FUNC<br />

INTEGER I, J(10), K<br />

REAL C, D, E(30)<br />

AUTOMATIC I, J, K(20)<br />

STATIC C, D, E<br />

...<br />

END FUNCTION<br />

...<br />

See Also<br />

• “Type Declaration Statements”<br />

• “OPTIONS Statement”<br />

• “SAVE Attribute and Statement”<br />

• “Functions, Subroutines, and Statement Functions” for details on subprograms<br />

5-20

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

Saved successfully!

Ooh no, something went wrong!