Flexible Rules
Home Publications Examples Downloads API Overview API Doc Tutorials

switch

Synopsis:

(switch expression
	(case expression1 statement1) 	
			....
	(case expressionN statementN) 
)

Description:

If expression is equal to expressionK execute statementK.

Example:

(switch  event 
	(case "yeti" (do
		(update figure "event" 
			attribute "image" to "yeti.png")
			end))
	(case "snowStorm" (do
		(update figure "event" 
			attribute "image" to "snowStorm.png")
			end))
	(case nil  (do
		(update figure "event" 
			attribute "image" to nil)
			end)))


Contact: Fulvio Frapolli (fulvio . frapolli //at// unifr . ch), Amos Brocco (amos . brocco //at// unifr . ch)
* Remove spaces and replace //at// with @
© 2009