#ATSTART (template initialization code) 

Top  Previous  Next

 

#ATSTART

  statements

#ENDAT

#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