Jump statements  continue

Chapter 1: Overview

break

The break statement causes an immediate exit from a loop or switch statement without executing any of the remaining statements in the statement. The next statement is then executed.

Table 1-10: Jump statements

Format

Meaning

while (expression) { do these commands; if (condition) break; do these other commands; } do this stuff;

If the break statement is executed, then the program immediately leaves the while loop, without executing the remaining statements in the loop, and continues with the “do this stuff” statements.





Copyright © 2005. Sybase Inc. All rights reserved. continue

View this book as PDF