Quote:
Originally Posted by Justin
There is no switch equivalent in EEL2...
|
IMHO no problem at all. Doing
Code:
a==1 ? (
...
) : a == 2 ? (
...
) : a == 3 ? (
...
) : a == 4 ? (
...
) : a == 5 ? (
...
);
is neither that much more writing nor worse readable than a switch construct.
If "a" contains an integer, the "switch" code could be optimized to use a calculated jump. But if "a" is a string (and the compare would us match() ) this would not be possible, either.
-Michael