Defining a Function

A function is composed of a function name, with the list of arguments, and the expression that forms its definition. You start a function by its name, followed by an opening parenthesis, the arguments for the function separated by commas, and finally a closing parenthesis. The following rules apply for function and argument names:

The function name and its definition are separated by a colon ( : ). The definition itself can be any valid expression, except that channel names are not accepted since user-defined expressions are not related to any particular setup. In the definition, the arguments can appear, complete with the dollar sign preceding it. Finally, the definition must end with a semicolon (;) and it can span several lines.

Note: Errors in the functions file will be reported when it is first read. This file is read every time that an unknown function is used in an expression.