FORTRAN 77 Language Reference

STATIC

The STATIC @ statement ensures that the specified items are stored in static memory.

STATIC list

Parameter 

Description 

list

List of variables and arrays 

Description

All local variables and arrays are classified static by default: there is exactly one copy of each datum, and its value is retained between calls. You can also explicitly define variables as static or automatic in a STATIC or AUTOMATIC statement, or in any type statement or IMPLICIT statement.

However, you can still use STATIC to ensure portability, especially with routines that leave a subprogram by some way other than a RETURN.

Also note that:

Example


       STATIC A, B, C 
       REAL P, D, Q 
       STATIC P, D, Q 
       IMPLICIT STATIC (X-Z)