FORTRAN 77 Language Reference

VOLATILE

The VOLATILE @ statement prevents optimization on the specified items.

VOLATILE nlist

Parameter 

Description 

nlist

List of variables, arrays, or common blocks 

Description

The VOLATILE statement prevents optimization on the items in the list. Programs relying on it are usually nonportable.

Example

Example: VOLATILE: @


       PROGRAM FFT 
       INTEGER NODE*2, NSTEPS*2 
       REAL DELTA, MAT(10,10), V(1000), X, Z 
       COMMON /INI/ NODE, DELTA, V 
       ... 
       VOLATILE V, Z, MAT, /INI/ 
       ... 
       EQUIVALENCE ( X, V ) 
       ... 

In the above example, the array V, the variable Z, and the common block /INI/ are explicitly specified as VOLATILE. The variable X is VOLATILE through an equivalence.