Examples of SWITCH LABEL Declarations

The following example declares CHOOSEPATH to be a switch label identifier with labels L1, L2, L3, and L4 in the switch label list. CHOOSEPATH[1] evaluates to label L1, CHOOSEPATH[2] to L2, and so on.

SWITCH CHOOSEPATH := L1,L2,L3,L4

The following example declares SELECT to be a switch label identifier with labels START and ERROR1 and designational expression CHOOSEPATH[2] in the switch label list. Note that from the previous SWITCH LABEL declaration, CHOOSEPATH[2] evaluates to L2; therefore, SELECT[3] evaluates to L2.

SWITCH SELECT := START,          % 1
                 ERROR1,         % 2
                 CHOOSEPATH[2]   % 3