break

The break statement terminates a while or for loop or a switch..case statement, and continues with the first instruction after the closing bracket.

Example:

while (x < 100)
{ 
  x+=1;
  if (x == 50) break; // loop will be ended prematurely
}

See also:

while, for, switch, continue

► latest version online

break

Die break-Anweisung beendet eine while- oder for-Schleife oder eine switch..case-Anweisung und fährt mit der ersten Anweisung nach der schließenden Klammer fort.

Beispiel:

while (x < 100)
{ 
  x+=1;
  if (x == 50) break; // Schleife wird vorzeitig beendet
}

Siehe auch:

while, for, switch, continue

► Neueste Version online