14.11.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, then no further action is taken and the do statement completes normally.
  • If execution of the Statement completes abruptly because of a continue with no label, then the Expression is evaluated. Then there is a choice based on the resulting value:
    • If the value is true, then the entire do statement is executed again.
    • If the value is false, no further action is taken and the do statement completes normally.
  • If execution of the Statement completes abruptly because of a continue with label L, then there is a choice:
    • If the do statement has label L, then the Expression is evaluated. Then there is a choice:
      • If the value of the Expression is true, then the entire do statement is executed again.
      • If the value of the Expression is false, no further action is taken and the do statement completes normally.
    • If the do statement does not have label L, the do statement completes abruptly because of a continue with label L.
  • If execution of the Statement completes abruptly for any other reason, the do statement completes abruptly for the same reason. The case of abrupt completion because of a break with a label is handled by the general rule (ยง14.6).