Datasheet
In mikroPascal PRO for AVR, values in the case statement can be variables too:
case byte_variable of
byte_var1: opmode := 0; // this will be compiled correctly
byte_var2:
opmode := 1; // avoid this case, compiler will parse
// a variable followed by colon sign as label
byte_var3: // adding a comment solves the parsing problem
opmode := 2;
end;
Nested Case statement
Note that the case statements can be nested – values are then assigned to the
innermost enclosing case statement.
166
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroPASCAL PRO for AVR
CHAPTER 5