Difference between revisions of "Break"

From Mesham
Jump to navigationJump to search
(Created page with '== Syntax == break; == Semantics == Will break out of the current enclosing loop body == Example == while (true) break; Only one iteration of the loop will complete, where…')
 
(Example)
Line 9: Line 9:
 
== Example ==
 
== Example ==
  
  while (true) break;
+
  while (true) { break; };
  
 
Only one iteration of the loop will complete, where it will break out of the body
 
Only one iteration of the loop will complete, where it will break out of the body
  
 
[[Category:sequential]]
 
[[Category:sequential]]

Revision as of 13:46, 12 January 2013

Syntax

break;

Semantics

Will break out of the current enclosing loop body

Example

while (true) { break; };

Only one iteration of the loop will complete, where it will break out of the body