| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #CYCLE (cycle to top of loop) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ create create source file .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ debug toggle debug generation .htm|{{btn_next_n.gif|Next page}}]] | | || **#CYCLE** {{blk2blue.jpg|blk2blue.jpg}} The **#CYCLE** statement immediately passes control back to the top of the #FOR or #LOOP structure in which it is enclosed to begin the next iteration. #CYCLE is only valid within a #FOR or #LOOP structure, else an error is generated during Template file pre-processing. #CYCLE 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)** **    OPEN(%File)** **   ****#CYCLE** **  #ELSE** **    #BREAK** **  #ENDIF** **#ENDFOR**