Assume:
switch ( test ) {
// Set some variables, call some functions ?
int var x = 1 ;
int var y = function(x) ;
//
case 1 :
// Process for test = 1
...
break;
case 5 :
// Process for test = 5
...
break;
default :
// Process for all other cases.
...
}
Is it 'legal' to execute that extra bit of code I added before the first case: ? I've never seen this in examples.
Aucun commentaire:
Enregistrer un commentaire