Navigation: Templates > Template Language Reference > Built-in Template Procedures >====== CALL (call a #GROUP as a function) ![]() | ![]() ![]() ![]() |
CALL( symbol [, parameters ] )
CALL | Calls a #GROUP as a function. |
symbol | A symbol that names a #GROUP section in the current template set. |
parameters | The parameters passed to the #GROUP. Each parameter must be separated by a comma. All parameters defined for the #GROUP must be passed; they may not be omitted. |
The CALL procedure places the return value from the #GROUP named by the symbol into the expression containing the CALL.
The parameters passed to the #GROUP fall into two categories: value-parameters and variable-parameters. Value-parameters are declared by the #GROUP as a user-defined symbol, while variable-parameters are declared by the #GROUP as a user-defined symbol with a prepended asterisk (*). Either a symbol or an expression may be passed as a value-parameter. Only a symbol may be passed as a variable-parameter.
Return Data Type: STRING
Example:
#SET(%SomeGroup,CALL(%SelectAGroup)) #!Call %SelectAGroup to get a #GROUP name
#INVOKE(%SomeGroup) #!Insert either %TrueGroup or %FalseGroup
#GROUP(%SelectAGroup)
#IF (%SomeCondition)
#RETURN('%TrueGroup(Clarion)')
#ELSE
#RETURN('%FalseGroup(Clarion)')
#ENDIF