User Tools

Site Tools


invoke_call_a_named_group_as_a_function_.htm
Navigation:  Templates > Template Language Reference > Built-in Template Procedures >====== INVOKE (call a named #GROUP as a function) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

INVOKE( symbol [, parameters ] )

blk2blue.jpg

INVOKE Calls a named #GROUP as a function.
symbol A symbol that contains the name of 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 INVOKE procedure places the return value from the #GROUP named in the symbol into the expression containing the INVOKE.

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

#SET(%AnotherGroup,INVOKE(%SomeGroup))  #!Call Selected Group for another #GROUP name

#INVOKE(%AnotherGroup)                  #!Insert either %DoTrueGroup or %DoFalseGroup

#GROUP(%SelectAGroup)

#IF (%SomeCondition)

 #RETURN('%TrueGroup(Clarion)')

#ELSE

 #RETURN('%FalseGroup(Clarion)')

#ENDIF

#GROUP(%TrueGroup)

 #RETURN('%DoTrueGroup(Clarion)')

#GROUP(%FalseGroup)

 #RETURN('%DoFalseGroup(Clarion)')

See Also:     #GROUP ,CALL ,#RETURN ,#CALL ,#INVOKE

Built-In Template Procedures

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