prev

Break and Continue

next

The break statement, as was seen in the switch example, can be used to force an exit from the control of switch, while, for, and do statements.

The continue statement causes the next iterations of the while, for, or do statement to begin. continue cannot be used in a switch statement.

Additionally there is a goto command that will jump to specified labels. Due to the complexity it can cause a goto statement is never desired.