Note: information on this page refers to Ceylon 1.1, not to the current release.

break statement

The break statement is a control directive that causes immediate termination of the enclosing for or while loop.


The general form of the break statement is

// ...within a while or for statement
// and often guarded by some condition



Within a for or while statement the break directive can be used to exit the block early without waiting for the for iterator to be exhausted or the while condition to become false.


  • Java's 'labelled' break directive is not supported. The break directive operates on the directly enclosing for or while statement.

See also