Syntax:
-
PURE [type-spec] FUNCTION function-name( [ dummy-arg-name-list ] )
|
PURE functions have no side effects
|
Syntactic constraints:
-
Global variables and dummy arguments cannot be used in any context that may cause the variable to become defined
-
Left hand side of assignment
-
DO index, ASSIGN, ALLOCATE
-
Actual argument with INTENT(OUT)
-
Targets of pointer assignments (due to later use of pointers)
-
Full list of restrictions is too long to fit on this slide!
-
No external I/O or file operations
-
Only inherited distribution/alignment of dummies and locals
|
Intrinsic functions are PURE
|