Next:
Pure Procedure Declaration Up: Data Parallel Statements Previous: Consequences of the

Pure Procedures

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:


paula@erc.msstate.edu
Thu Jul 21 17:05:43 CDT 1994