I would prefer to first separate the cases and then use functions for common code, like
Code:switch (mycase){ case 0: // specific to case 0 break; case 1: do12(); // common to both 1 and 2 // specific to case 1 break; case 2: { do12(); // common to both 1 and 2 // specific to case 2 break; }




Reply With Quote