C
Chris
Hi,
can you specify a range in a switch - statement ?
switch (i)
{
case 100 - 999 :
// do something
break;
case 1000 - 9999:
// do something else
break;
}
Previous syntax is not allowed, I know,
but can you solve this using 'switch' ? without having to provide a case
statement for every possible value and without using 'if' ?
thanks
Christian
can you specify a range in a switch - statement ?
switch (i)
{
case 100 - 999 :
// do something
break;
case 1000 - 9999:
// do something else
break;
}
Previous syntax is not allowed, I know,
but can you solve this using 'switch' ? without having to provide a case
statement for every possible value and without using 'if' ?
thanks
Christian