Executes code according to value of an integral argument
Used where one or several out of many branches of code need to be executed according to an integral value.
Template:sparam shall be an expression, convertible to an integer value.
All Template:sparams shall be constant expressions, convertible to an integer value, which is unique within this
If the Template:sparam evaluates to a value, equal to the value of one of the defined Template:sparam, the Template:sparam (if present) and all subsequent statements (except Template:sparam, if present) are executed. If the value of the Template:sparam does not match any of the Template:sparams, the Template:sparam is executed if present.
It is useful to note, that if the execution of subsequent statements is undesirable, the break statement can be used. In that case the execution of the
switch statement terminates.
|This section is incomplete|
Reason: no example