Description
Add support for the break statement from end to end.
break transfers control to the end of the nearest enclosing loop. It can only be used inside loops; using it elsewhere should produce an error. (Switch statements are not yet supported.)
Example
while (condition) {
if (condition) {
break;
}
}
Future Considerations
- Extend support to
switch statements in future updates.
Benefits
- Enhances language expressiveness.
- Provides better flow control in loops.
Description
Add support for the
breakstatement from end to end.breaktransfers control to the end of the nearest enclosing loop. It can only be used inside loops; using it elsewhere should produce an error. (Switch statements are not yet supported.)Example
while (condition) { if (condition) { break; } }Future Considerations
switchstatements in future updates.Benefits