FORTRAN, Statements, AUTOMATIC and STATIC *Conan The Librarian
Control the storage allocation of variables in subprograms. The
AUTOMATIC and STATIC attributes can be specified in a type
declaration statement or an AUTOMATIC or STATIC statement, and
take one of the following forms: Type Declaration Statement:
type, [att-ls,] AUTOMATIC [,att-ls] :: v [,v]... type, [att-ls,]
STATIC [,att-ls] :: v [,v]... Statement: AUTOMATIC v [,v]...
STATIC v [,v]... type Is a data type specifier. att-ls Is an
optional list of attribute specifiers. v Is the name of a
variable or an array specification. It can be of any type.
AUTOMATIC and STATIC declarations only affect how data is
allocated in storage, as follows: o A variable declared as
AUTOMATIC and allocated in memory resides the stack storage
area. o A variable declared as STATIC and allocated in memory
resides in the static storage area. If you want to retain
definitions of variables upon reentry to subprograms, you must
use the SAVE attribute. Automatic variables can re