The break and continue statements will work only for their directly related process. You can also break out of nested functions too.Code:while(blah) { switch(blah) { case BLAH: break; } }
Code:while( 1 ) { for ( i = 0; i < 10; i++ ) { switch(blah) { case 1: break; //break out of the switch case 2: break; break; //break from the switch and the for case 3: break; break: break; //break from the switch, for and while } } }