I\'ve seen a suggested coding standard that reads Never use goto unless in a switch statement fall-through.
I don\'t follow. What exactly would this \'
In addition to using goto case, you can goto a label that is in another case clause:
switch(i) {
case "0":
// do some stuff
break;
case "1":
// other stuff, then "fall through" to next case clause
goto Case2;
case "2":
Case2:
break;
}
This way, you can jump to another case clause without worrying about the value or type of the expression.
Some sort of explicit "fallthrough" keyword that can be substituted for break would have been nice, though...