Language documentation | Contents | Index |
switch (expr) { case expr1: statement case expr2: statement ... default: statement } |
The switch statement is similar to a series of if statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for.
Concept does not support labels and goto. The switch implementation is a little different from the C standard switch, mainly because instead of constant values, you can have full expressions (any expression). |
switch (i) { |
Documented by Eduard Suica, generation time: Thu Oct 15 20:02:10 2009 GMT | (c)2009 RadGs Software |