Syntax:
switch {block} [case {value [to {value]} [or {value [to {value]} ...] {block} ...]] ... [default {block}]
Keyword handler:
net.eclecity.linguist.basic.keyword.BasicKSwitch.class
Runtime handler(s):
net.eclecity.linguist.basic.handler.BasicHSwitch.class
Function:
Implements a multi-way decision structure, enabling a single value to be tested against a number of conditions
or ranges of condition. Unlike Java, the cases need not be simple numerics; they can be any numeric
value in the system. See also if.
To implement a switch using string values, see dispatcher
Example(s):
switch Count case 1 set Flag case Start to Finish or Special add 1 to Count default clear Flag