3. Statements : OpenROAD Language Statements : Case Statement
 
Share this page                  
Case Statement
This statement selects one of a number of possible actions based on the value of an expression. The expression can be any valid OpenROAD data type.
This statement has the following syntax:
case key of
          valuelist: statement | beginendblock
          {valuelist: statement | beginendblock}
endcase;
A related statement is the nextcase statement, which is used to jump from the current statement to the beginning of the next statement block (this is the equivalent to the fall-through case in C). See the example.
In SQL statements '' and ' ' are evaluated equally, but in a 4GL case statement they are not.