Switch

From FreeSpace Wiki
Jump to: navigation, search
Switch (Conditional operator)
	Performs one action according to the value of the first argument.  If the argument evaluates to 0, the first action is performed; if the 
argument is 1, the next action is performed, etc.  If the value is out of range, no action is performed at all.

Takes 2 or more arguments...
	1:	Numeric expression to evaluate.
	Rest:	List of actions, one of which (at most) will be taken according to the value of the expression.