Hi,
I tried searching but I don't know how exactly to describe my question in 2-3 words so I didn't find anything.
Is it possible to do something like this?Just to get the idea... I know it doesn't work:
switch(c){
case '1':{ (...) ; break;}
case '2':{ (...) ; break;}
case '3':{ (...) ; break;}
if(f){
case '4':{ (...) ; break;}
case '5':{ (...) ; break;}
case '6':{ (...) ; break;}
}
}
I can always do it this way:
if(f){
switch(c){
case '1':{ (...) ; break;}
case '2':{ (...) ; break;}
case '3':{ (...) ; break;}
case '4':{ (...) ; break;}
case '5':{ (...) ; break;}
case '6':{ (...) ; break;}
}
}
else{
switch(c){
case '1':{ (...) ; break;}
case '2':{ (...) ; break;}
case '3':{ (...) ; break;}
}
}
Or put the if check in cases 4,5,6...
Isn't there anything simpler and better to do?