DO CASE:

 
<group>                 ::= <group head> <ending>

<group head>            ::= DO <case selector> ;
                          | <group head> <statement>

<case selector>         ::= CASE <expression>

<ending>                ::= END
                          | END <identifier>
                          | <label definition> <ending> 
  
 
DO CASE allows selection of any one of a sequence of statements. The <expression> following case is evaluated and used to select one of the statements in the group body (<group head> above), starting with zero for the first statement. Following execution of the selected statement, control passes to the next statement following end. If the expression following case is negative or greater than the number of statements in group the result is undefined. No otherwise or default case is defined.

Example:


do case i;
  output = 'value=0';
  output = 'value=1';
end;