A pure function is one that obeys certain syntactic constraints
that ensure it produces no side effects. This
means that the only effect of a pure function reference on the state
of a program is to return a result-it does not modify the values,
pointer associations, or data mapping of any of its arguments or global
data, and performs no external I/O.
A pure subroutine is one that produces no side effects
except for modifying the values and/or pointer associations of
INTENT(OUT) and INTENT(INOUT) arguments.
These properties are declared by a new attribute (the PURE
attribute) of the the procedure.
A pure procedure (i.e., function or subroutine) may be used in any way
that a normal procedure can.
However, a procedure is required to be pure if it is used in any
of the following contexts:
The HPF Journal of Development also proposes allowing elemental
invocation of pure procedures with scalar arguments.
(End of rationale.)