#DEFINE (user defined macro)

Top  Previous  Next

 

#DEFINE ( %macro name )

    statements

#ENDDEFINE

#DEFINE

Defines a user defined macro that can be expanded using #EXPAND.

%macro name

A user defined symbol used as the macro's identifier.

Statements

A sequence of statements.

#ENDDEFINE

Terminates the definition of a user defined macro.

#DEFINE defines the beginning of a section of code which can be expanded into generated code using the #EXPAND statement. A macro may not be defined with any parameters. #DEFINE must be terminated with #ENDDEFINE. Using #DEFINE and #EXPAND to define and expand macros for commonly used code sections will lead to cleaner template code while hiding unneeded target code from immediate view.

Example:

#DEFINE(%InRangeCheck)

 IF %ControlUse <= TODAY()

  SELECT(?%ControlUse)

 END

#ENDDEFINE

See Also:     #EXPAND