Definitions
Additional functions to call in patterns are described in definitions blocks. In TPL 1.5, definitions blocks are used for User-defined-functions.
The basic form of a data integration definitions block is:
*definitions* _name_ _version_
"""_Description of definitions block_"""
type := _definitions_type_;
_other_setting_ := _setting_value_;
...
*define* _function_name_
"""_Function description_"""
parameters := _param1_, _param2_, ...;
_other_setting_ := _setting_value_;
*end define*;
...
*end definitions*;
All definitions blocks must have a type specification. Other settings might be required by certain definitions types. The definitions block contains one or more define blocks, describing the functions being defined. All functions that take parameters must have a parameters specification, listing the names of the parameters to the function. (If a function takes no parameters, the parameters specification can be missed out.) Most definitions types also require other settings in the define blocks.
Once defined, functions can be called in patterns with the usual function calling syntax. Definitions can be imported from one module into another, with the usual versioning scheme.