CHP Guarded Commands - The HAC Language
Description: The HAC Language

Next: CHP Deterministic Selection, Previous: CHP Loops, Up: CHP Statements

#### 14.4.2 Guarded Commands

- CHP-guarded-command : CHP-expr `->` CHP-stmt-list

A special case of a guarded commands is an else-clause, which replaces the guard expression with the keyword `else`. An else clause may only appear at the end of deterministic selections, but not any other selection statements.

Execution: Interpretation depends on the context in which the guarded command appears, e.g. deterministic vs. nondeterministic selection, or do-while loops.