Rule R215 of the Fortran 90 standard for *executable-construct* is
extended to include the *forall-construct*.

XBNF
forall-construct -to -rule
to to **is ** FORALL forall-header
forall-body-stmt
[ forall-body-stmt ] ...
END FORALL

forall-body-stmt -to -rule
to to **is ** forall-assignment
-to **or ** where-stmt
-to **or ** where-construct
-to **or ** forall-stmt
-to **or ** forall-construct
XBNF

- Any procedure referenced in a
*forall-body-stmt*, including one referenced by a defined operation or assignment, must be pure as defined in Section . - If a
*forall-stmt*or*forall-construct*is nested in a*forall-construct*, then the inner`FORALL`may not redefine any*index-name*used in the outer*forall-construct*.

- []
*Rationale.*These statements are allowed in a`FORALL`construct because they are defined as forms of assignment in Fortran 90 and HPF. The intent is that*forall-construct*, like*forall-stmt*, is a block assignment rather than a general-purpose ``parallel loop.'' (*End of rationale.*)

To determine the set of permitted values for an *index-name*, we
introduce some simplifying notation. In the *forall-triplet-spec*, let

- be the first
*subscript*(``lower bound''); - be the second
*subscript*(``upper bound''); - be the
*stride*; and - be .

If *stride* is missing, it is as if it were present with the value
1. The set of permitted values is determined on entry to the construct
and is , . The
expression *stride* must not have the value 0. If for some *index-name* , no *forall-body-stmt* is executed.

Each assignment nested within a `FORALL` construct
assigns to memory locations specified by the
*forall-assignment* for permitted values of the *index-name*
variables. A program that causes multiple values to be assigned to the
same location by a single statement is not HPF-conforming and
therefore has no defined meaning.
An HPF-conforming program may, however, assign to the same location in
syntactically different assignment statements.
This is a semantic constraint rather than a syntactic
constraint, however; in general, it cannot be checked during compilation.

Thu Dec 8 16:17:11 CST 1994