Next: continue
Up: Flow control and loops
Previous: Labels
Contents
- Used to exit from any block (not just a switch).
- Most often used to break out of a loop.
- An unlabeled break terminates the innermost switch, for, while, or do-while.
- To terminate an outer statement, label the outer statement and use its label name in the break statement.
Next: continue
Up: Flow control and loops
Previous: Labels
Contents