[ HPF Home | Versions | Compilers | Projects | Publications | Applications | Benchmarks | Events | Contact ] |
Next: Pure Procedure Declaration
Up: Data Parallel Statements
Previous: Consequences of the
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:
©2000-2006 Rice University | [ Contact Us | HiPerSoft | Computer Science ] |