Changes between Initial Version and Version 1 of Break
- Timestamp:
- 03/23/10 10:39:09 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Break
v1 v1 1 = Break Statement = 2 3 The '''break''' statement terminates the execution of the nearest enclosing loop in which it appears. 4 Control passes to the statement that follows the terminated statement, if any. 5 6 == Grammar == 7 break 8 9 == Example == 10 11 {{{ 12 def main is shared 13 for i in 1 : 10 14 print i 15 16 if i == 4 17 break 18 19 # Loop exits after printing 1 through 4 20 }}}