break (thing)

break (thing)

(thing) by untergeek (I like it!) Tue Jun 13 2000 at 21:06:26
1 , 9 s, 58 w, 384 c

In C and programming languages with C style syntax break is used to exit a block of code. Primarily it is used to exit loops when some condition is met.


while (1)
{
  //do something...
  if (done)
  {
    break;
  }
  //do something else...
}


Of course break is also used quite heavily in switches to keep all hell from breaking loose.

http://everything2.com/title/break http://everything2.com/node/602886