How to: |
You can call a function from a COMPUTE, DEFINE, or VALIDATE command. You can also call functions from a Dialogue Manager command, a Financial Modeling Language (FML) command, or a MODIFY command. A function is called with the function name, arguments, and, for external functions, an output field.
For more information on external functions, see Types of Functions.
function(arg1, arg2, ... [outfield])
where:
Is the name of the function.
Are the arguments.
Is the field that contains the result, or the format of the output value enclosed in single quotation marks. This argument is required only for external functions.
In Dialogue Manager, you must specify the format.
COMPUTE field/fmt = function(input1, input2,... [outfield]);
or
DEFINE FILE file field/fmt = function(input1, input2,... [outfield]);
or
-SET &var = function(input1, input2,... [outfield]);
where:
Creates a virtual field that may be used in a request as though it is a real data source field.
Calculates one or more temporary fields in a request. The field is calculated after all records have been selected, sorted, and summed.
Is the field that contains the result.
Is the file in which the virtual field is created.
Is the variable that contains the result.
Is the format of the field that contains the result.
Is the name of the function, up to eight characters long.
Are the input arguments, which are data values or fields used in function processing. For more information about arguments, see Supplying an Argument in a Function.
Is the field that contains the result, or the format of the output value enclosed in single quotation marks. This argument is required only for external functions.
In Dialogue Manager, you must specify the format.