User Tools

Site Tools


atstart_template_intialization_code_.htm
Navigation:  Templates > Template Language Reference > Complete Alpha Listing >====== #ATSTART (template initialization code)C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

#ATSTART

statements

#ENDAT

blk2blue.jpg

#ATSTART Specifies template code to execute before the #PROCEDURE, #CODE, #CONTROL, or #EXTENSION generates.
statements Template language code.
#ENDAT Terminates the section.

The #ATSTART structure specifies template code to execute before the #PROCEDURE, #CODE, #CONTROL, or #EXTENSION generates its code. Therefore, the statements should normally only contain Template language. #ATSTART is usually used to initialize internal template variables. You may not place #ATSTART 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 #ATSTART structure.

Example:

#CONTROL(BrowseList,'Add Browse List controls')

#ATSTART

 #FIX(%Control,%ListBox)

 #DECLARE(%ListPre)

 #SET(%ListPre,'List' & %ActiveTemplateInstance & ':')

                       #!Makes %ListPre contain “List#:'

#ENDAT

#AT(%DataSectionBeforeWindow)

%ListPre:Scroll  LONG      !Scroll for %Control

%ListPre:Chioce  LONG      !Choice for %Control

#ENDAT

See Also:     #PROCEDURE , #CODE , #CONTROL , #EXTENSION

atstart_template_intialization_code_.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1