break_break_out_of_a_loop_.htm
Navigation: Templates > Template Language Reference > Complete Alpha Listing >====== #BREAK (break out of a loop) ====== | ![]() ![]() |
#BREAK
The #BREAK statement immediately breaks out of the #FOR or #LOOP structure in which it is enclosed. Control passes to the next statement following the #ENDFOR or #ENDLOOP. #BREAK is only valid within a #FOR or #LOOP structure, else an error is generated during Template file pre-processing. #BREAK acts as a #RETURN statement if issued from within a #GROUP inserted in the loop (unless it is within a #FOR or #LOOP structure completely contained within the #GROUP).
Example:
#SET(%StopFile,'CUSTOMER')
#FOR(%File)
** #IF (UPPER(%File) = %StopFile)**
** **#BREAK
** #ENDIF**
** OPEN(%File)**
#ENDFOR
break_break_out_of_a_loop_.htm.txt · Last modified: by 127.0.0.1





