TAL Programmer's Guide
CASE Statement, Labeled
Controlling Program Flow
096254 Tandem Computers Incorporated 12–7
Directives and CASE
Statements
If a CASE statement contains many GOTO statements, you can use the OPTIMIZE
directive to reduce the size of the object code. Use OPTIMIZE level 1 or 2 as follows:
In a program under development, use level 1.
In a stable program, use level 2, which optimizes code across statement
boundaries, so debugging is more difficult.
The CHECK directive does not affect the labeled CASE statement (as it does the
unlabeled CASE statement).
Labeled CASE
Statement Execution
Figure 12-3 shows how the labeled CASE statement executes.
Figure 12-3. Labeled CASE Statement Execution
CASE selector OF
BEGIN
END;
next-statement
406
OTHERWISE clause
case-alternative
case-alternative
.
.
.