| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #ATEND (template reset code) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ at insert code in an embed point .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ atstart template intialization code .htm|{{btn_next_n.gif|Next page}}]] | | || **#ATEND** //statements// **#ENDAT** {{blk2blue.jpg|blk2blue.jpg}} | **#ATEND** | Specifies template code to execute after the #PROCEDURE, #CODE, #CONTROL, or #EXTENSION generates. | | //statements// | Template language code. | | **#ENDAT** | Terminates the section. | The **#ATEND **structure specifies template code to execute after the #PROCEDURE, #CODE, #CONTROL, or #EXTENSION generates its code. Therefore, the //statements// should only contain Template language. #ATEND is usually used to reset internal template variables. You may not place #ATEND within any type of conditional structure (such as #IF or #CASE). If you need to conditionally generate the code, place the #IF or #CASE structure within the #ATEND structure. **Example:** **#CONTROL(BrowseList,'Add Browse List controls')** ** ****#ATEND** **  #SET(%ListQueue,%NULL)** ** #ENDAT** **See Also:     **[[ procedure begin a procedure template .htm|#PROCEDURE]] , [[ code define a code template .htm|#CODE]] , [[ control define a control template .htm|#CONTROL]] , [[ extension define an extension template .htm|#EXTENSION]]