SWITCH
and CASE
statements help control complex conditional and branching operations. The SWITCH
statement transfers control to a statement within its body. If no expr
match with var
, the commands between DEFAULT
and BREAK
are executed.
Syntax
SWITCH var
CASE expr1
...
BREAK
CASE expr2
...
BREAK
...
DEFAULT
...
BREAK
SWITCH_END
Parameters
var
(integer or string): variable to switch from
expr, expr1 ... exprn
(integer or string): expressions to match
Remarks
Example:
SWITCH test
BREAK
SWITCH_END
Usable since script version 1.3 (Allplan 2013-1).
(C) ALLPLAN GmbH |
Privacy policy |