Code:
void foo()
{
unsigned int x,y;
unsigned int n= rand();
switch(n%4)
{
for(x=0;x<1000;++x)
{
for(y=0;y<1000;++y)
{
case 0:
//special instructions
break;
case 1:
//special instructions
break;
case 2:
//special instructions
break;
case 3:
//special instructions
break;
}
}
}
}
in the code above, are switch statement cases evaluated in the inner loop? i'm thinking vs should be smart enough the answer is 'no', but i can't think of a way to verify it empirically, so i pose the question here.
thanks.