Can you have nested switch statements? Will this be just as efficient as IF-Else statements? It sure does look alot neater.
Cheers!
e.g
Code:switch(a) { case 1: switch(b) { case 'm': do something; break; } . . . . . . . }
Can you have nested switch statements? Will this be just as efficient as IF-Else statements? It sure does look alot neater.
Cheers!
e.g
Code:switch(a) { case 1: switch(b) { case 'm': do something; break; } . . . . . . . }
there are only 10 people in the world, those who know binary and those who dont
Yes you can nest switch statements. I think its more effective then else if statements most of the time. Their are times such as comparing multiple things at once where else if is better.