HOME
| OPENMP API Specification: Version 5.1 November 2020

2.18  if Clause

Summary The semantics of an if clause are described in the section on the construct to which it applies. The if clause directive-name-modifier names the associated construct to which an expression applies, and is particularly useful for composite and combined constructs.

Syntax

SVG-Viewer needed.

The syntax of the if clause is as follows:  

 
if([ directive-name-modifier :] scalar-expression)  

SVG-Viewer needed.

SVG-Viewer needed.

The syntax of the if clause is as follows:  

 
if([ directive-name-modifier :] scalar-logical-expression)  

SVG-Viewer needed.

Description The effect of the if clause depends on the construct to which it is applied. For combined or composite constructs, the if clause only applies to the semantics of the construct named in the directive-name-modifier if one is specified. If no directive-name-modifier is specified for a combined or composite construct then the if clause applies to all constructs to which an if clause can apply.