2 ms·
The C# approach sounds like a recipe for abuse: switch(something) { case 1: // Do stuff goto case 4; case 2:
by kstenerud 14y ago
The C# approach sounds like a recipe for abuse:
switch(something)
{
case 1:
// Do stuff
goto case 4;
case 2:
// Do stuff
goto case 1;
case 3:
// Do stuff
goto case 5;
case 4:
// Do stuff
goto case 3;
case 5:
// Do stuff
break;
}
- PotatoEngineer 14y agoThat's quite horrible! Fortunately, it's obviously horrible, and since "goto" has such a stigma attached to it, programmers will only use it when it's necessary. (Cross your fingers.)
- mkr-hn 14y agoregister_globals would like to have a word with you.