14.10.1 Abrupt Completion

Abrupt completion of the contained Statement is handled in the following manner:

  • If execution of the Statement completes abruptly because of a break with no label, no further action is taken and the while statement completes normally.
    • If execution of the Statement completes abruptly because of a continue with no label, then the entire while statement is executed again.
    • If execution of the Statement completes abruptly because of a continue with label L, then there is a choice:
      • If the while statement has label L, then the entire while statement is executed again.
      • If the while statement does not have label L, the while statement completes abruptly because of a continue with label L.
    • If execution of the Statement completes abruptly for any other reason, the while statement completes abruptly for the same reason. Note that the case of abrupt completion because of a break with a label is handled by the general rule for labeled statements (§14.6).

Page view tracker