break
break
Stops the loop that runs it: while, for, foreach, lmap, or dict for.
Examples
A click on an example runs it in the shell of the page.
foreach x {1 2 3} {if {$x == 2} break; set last $x}; set last:1
Facts
- Capability: none.
- Compute cost: one compute unit for the call, and more for the commands that it runs.