next up previous contents
Next: Semantics of the ON Up: The ON Directive Previous: The ON Directive

Syntax of the ON Directive

There are two flavors of the ON directive: a single-statement form and a multi-statement form. The syntax for these directives is

H902 on-directive is ON on-stuff
H903 on-stuff is home [ , resident-clause ] [ , new-clause ]
H904 on-construct is
directive-origin block-on-directive
block
directive-origin end-on-directive
H905 block-on-directive is ON on-stuff BEGIN
H906 end-on-directive is END ON
H907 home is HOME ( variable )
or HOME ( template-elmt )
or ( processors-elmt )
H908 template-elmt is template-name [ ( section-subscript-list ) ]
H909 processors-elmt is processors-name [ ( section-subscript-list ) ]

The nonterminal resident-clause will be defined in Section 9.3. For the present, it suffices to say that this is a form of the RESIDENT directive mentioned in the introduction.

The home is often called the HOME clause, even in cases where the keyword HOME is not used. Note that variable is a Fortran syntax term that means (roughly) ``a reference, including an array element, array section, or derived type field''; variable does not include template or processor elements because they are defined only in directives. Note also that block is a Fortran syntax term for ``a series of statements treated as a group''--for example, the body of a DO construct.

The on-directive is a kind of executable-directive (see rule H205). This means that an on-directive can appear wherever an executable statement can.

An on-construct is a Fortran executable-construct. This syntax implies that such constructs can be nested, and if so they will be properly nested.


next up previous contents
Next: Semantics of the ON Up: The ON Directive Previous: The ON Directive