pTAL Reference Manual (H06.08+)
Statements
HP pTAL Reference Manual—523746-006
12-13
Labeled CASE
Labeled CASE
The labeled CASE statement executes a choice of statements when the value of the
selector matches a case label associated with those statements.
selector
is an INT or INT (32) value arithmetic expression that uniquely selects the case-
alternative for the program to execute.
case-alternative
associates one or more case-label s or one or more ranges of case-label s
with one or more statement s. The statement s of a case-alternative are
executed if selector equals an associated case-label. Each case-
alternative has the form:
case-label
a signed INT constant or LITERAL. Each case-label must be unique in the
CASE statement.
lower-case-label
is the smallest value in an inclusive range of signed INT constants or
LITERALs.
CASE
selector
OF BEGIN
statement-2
;
END
VST041.vsd
case-alternative
;
->
OTHERWISE
case-label
lower-case-label upper-case-label
..
,
->
statement-1
;
VST042.vsd










