Switch

SWITCH is a control command that helps the user to avoid complicated if constructions:
Format:
switch int_expr_1
case int_expr_2
statements
[break]
case int_expr_3
statements
[break]
...
[default
statements]
endswitch

Description:
The expression which follows the keyword switch is evaluated and compared to the different expressions at the case statements. If a match is found, the execution of the commands continues after the corresponding case statement. Normally the user wishes to leave the switch block before the next case statement appears. That is done by the break statement, like in for loops. If none of the case expressions matches the switch value and the user supplied a default statement, command execution continues there.

e.g.:
! 
switch arg(1) 
  case 123 
    read arg(2)
    break 
  case 456 
    ...
endswitch