Is there a possibility for a continue
or break
to have a bigger scope than the currently running loop?
In the following example, I desire to to continue on the outer for-loop when expr
is true, although it is called in the inner for-loop, so that neither [some inner code]
nor [some outer code]
is executed.
for(int outerCounter=0;outerCounter<20;outerCounter++){
for(int innerCounter=0;innerCounter<20;innerCounter++){
if(expr){
[continue outer]; // here I wish to continue on the outer loop
}
[some inner code]
}
[some outer code]
}
In the above