VOLATILE Statement
LF Fortran 95

VOLATILE Statement

Description

The VOLATILE statement indicates that a data object may be referenced, become redefined or undefined by means not specified in the Fortran standard.


Syntax

VOLATILE [::] object-name-list
Where:

object-name-list is a list of data objects.

Remarks

If an object has the VOLATILE attribute, it cannot have the PARAMETER, INTRINSIC, EXTERNAL, or INTENT(IN) attributes.

If an object has the VOLATILE attribute, then all of its subobjects are VOLATILE.

An object may have the VOLATILE attribute in one scoping unit without necessarily having it in another scoping unit.

If both POINTER and VOLATILE are specified, the volatility applies to the target of the POINTER and to the pointer association status.

If both ALLOCATABLE and VOLATILE are specified, the volatility applies to the allocation status, bounds and definition status.

Example

real :: r1 volatile :: r1 ! volatile statement real,volatile :: r2 ! volatile attribute