BREAK (Short name: BRE)
Top  Previous  Next

Use the BREAK command to force an early exit from a WHILE...ENDWHILE loop or a SWITCH...ENDSW structure.

break

About the BREAK Command

The BREAK command is usually run in an IF...ENDIF structure contained within a WHILE...ENDWHILE loop or a CASE block within a SWITCH...ENDSW structure. The IF conditions indicate when to run the BREAK.

R:BASE exits the currently processing WHILE...ENDWHILE loop or SWITCH...ENDSW structure when a BREAK is encountered, and does not run any further commands in the WHILE loop or SWITCH structure. BREAK decreases the nesting level by one. BREAK passes control to the next line of the command file following the WHILE loop or SWITCH structure.

Examples

For an example of using BREAK with WHILE...ENDWHILE, see the "WHILE...ENDWHILE" entry. For an example of using BREAK with SWITCH...ENDSW, see the "SWITCH...ENDSW" entry.