User-defined functions can be used to compute values in
your high-level integration language rules.
Functions are declared in the language by using the following
syntax.
declare functionName: function TypeList to Type;
For
instance, to declare a function that computes the edit distance between
two strings, use this syntax.
declare editDistance: string to string;
Originally,
language functions took only one input parameter. Multi-parameter
functions were specified by using an input record. For example, a
simple function that concatenates two strings would be specified with
the following syntax.
declare concat: function [ str1: string, str2: string ] to string;
However,
the language now allows function declarations that contain multiple
input parameters. Concatenation can also be defined as follows.
declare concat: function (string, string) to string;
Use
the following topics to learn more about functions.