The VOLATILE statement indicates that a data object may be referenced, become redefined or undefined by means not specified in the Fortran standard.
SyntaxVOLATILE [::] object-name-listWhere:
object-name-list is a list of data objects.
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.
Examplereal :: r1 volatile :: r1 ! volatile statement real,volatile :: r2 ! volatile attribute