4 ms·
break and continue with an integer argument, how many times to break. "break" breaks out of nearest loop, "break 2" breaks out of two. "continue 2" breaks out o
by nlewycky 4y ago
break and continue with an integer argument, how many times to break. "break" breaks out of nearest loop, "break 2" breaks out of two. "continue 2" breaks out of one loop and then performs "continue" on the loop outside that.
- compiler-devel 4y agoThis is a neat idea but I'm afraid it's fraught in that the resulting code could be as hard to maintain as the same written with goto.
- hvdijk 4y agoLabels would be more readable for that IMO: outer: for (...) for (...) if (...) break outer;