Your best bet is to avoid using Switch at all, especially in production code. It is very easy to introduce very hard to trace bugs and is just too fragile.
If you have a large number of possible branches use a dispatch table, otherwise, if-then-else (or ? : ).
In reply to Re: using switch
by thundergnat
in thread using switch
by sicone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |