User Tools

Site Tools


generate_generate_source_code_section_.htm
Navigation:  Templates > Template Language Reference > Complete Alpha Listing >====== #GENERATE (generate source code section) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

#GENERATE( section )

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

generate_generate_source_code_section_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1