Chapter 4

Program Control

Nonlocal Exits and Cleanup Clauses

Nonlocal exits allow the direct transfer of control to a previous point in program execution. The normal chain of function returns is aborted.

Cleanup clauses are bodies that are guaranteed to execute, even if the program segment of which they are a part is aborted by a nonlocal exit.

Nonlocal exits and cleanup clauses are implemented by the block statement. A complete description of the block statement is given on page 404.