| **Navigation:**  [[templates.htm|Templates]] > [[tlrcontents.htm|Template Language Reference]] > Complete Alpha Listing >====== #GENERATE (generate source code section) {{c6h0068.jpg|C6H0068.jpg}} ====== | [[ free free a multi valued symbol .htm|{{btn_prev_n.gif|Previous page}}]][[tlrcontents.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ globaldata default global data declarations .htm|{{btn_next_n.gif|Next page}}]] | | || **#GENERATE(** //section// **)** {{blk2blue.jpg|blk2blue.jpg}} | **#GENERATE** | Generates a section of the application. | | //section// | One of the following built-in symbols: %Program, %Module, or %Procedure. This symbol indicates the portion of the application to generate. | The **#GENERATE** statement generates the source code for the specified //section// of the application by executing the Template Language statements contained within that //section//. #GENERATE should only be used within the #APPLICATION or a #UTILITY section of the Template. When //section// is: | %Program | The #PROGRAM section of the Template is generated. | | %Module | The appropriate #MODULE section of the Template is generated. | | %Procedure | The appropriate #PROCEDURE section of the Template for the current value of %Procedure is generated. | **Example:** **#GENERATE****(%Program)                            #!Generate program header** **#FOR(%Module)                                  #!** ** ****#GENERATE****(%Module)                           #!Generate module header** **  #FOR(%ModuleProcedure)                       #!For all procs in module** **    #FIX(%Procedure,%ModuleProcedure)          #!Fix current procedure** **   ****#GENERATE****(%Procedure)                      #!Generate procedure code** **  #ENDFOR                                      #!EndFor all procs in module** **#ENDFOR                                        #!EndFor all modules**