2.3 Functions

Functions cause special processing to occur. They usually appear within a SET, STRING, or VAR keyword.

{SET TisATest="this is a test"}
{VAR substring(TisATest,  8, 6)} {! output "a test"}

Function names are case sensitive.

Functions can be used in expressions as long as the expression is parenthesized:

{SET tomorrow =   (today() + 86400000)}

Arithmetic expressions as function parameters must be enclosed in parentheses:

  {SET curDay = today()}

Tomorrow is {VAR date( (curDay + 86400000), {STRING fullDate})}

Functions can serve as parameters to other functions:

{VAR date( today(), {STRING fullDate})}

Variables and names of strings in STRING TABLES cannot have the name of a function.

{SET date = today()}   {! Illegal. date is the name of a function. }