Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > B

BREAK (Short name: BRE)

Scroll Prev Top Next More

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 WHILE...ENDWHILE. For an example of using BREAK with SWITCH...ENDSW, see SWITCH...ENDSW.