switch's only choose a value, the can't evaluate expressions for cases.
Yes, although simple arithmetic expressions that can be evaluated at compile time may be supported.
[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred. [size="2"]
That means expressions with only literals or enumeration values that result in a single integer value, such as case FOO + 1:.
The expression in switch can be (almost) whatever you want, but anything after case needs to be a single constant integer (or something that trivially results in that). So, no comparisons, no boolean logic, no function calls, etc. -- integers, like 5 or 8, or 7123, or 213+5.