I would like to know if we could use the case method with more than 1 expression. For example, i want to do the same thing for case 1 to 10, another thing for case 11 to 15...
Is it possible?
It 9is not like in Visual Basic but you can do something like:
switch(whatever)
{
case 0:
case 1:
case 2:
case 3:
//do something for the interval 0...3
break;
case 6:
case 7:
case 8:
case 9:
//do something for 6...9
break;
....
}
Notice the break instruction position s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darkness...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.