company logo

Case block

The case block supports conditional processing for a number of cases, which are returned by the case condition. Depending on the value returned by the case operand, the case block associated with the appropriate value is executed. When the result does not match any case, the other statement will be executed if defined.

Definition: 

case_block := _switch condition  '{' [ case_stmt(*) ] [ other_stmt ] '}'