The STATIC @ statement ensures that the specified items are stored in static memory.
Parameter |
Description |
list |
List of variables and arrays |
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:
Arguments and function values are automatic.
A STATIC statement and a type statement cannot be combined to make a STATIC type statement. For example, the statement STATIC REAL X does not declare the variable X to be both STATIC and REAL; it declares the variable REALX to be STATIC.
STATIC A, B, C REAL P, D, Q STATIC P, D, Q IMPLICIT STATIC (X-Z)