A function call is a term in an expression calling a routine that carries
out some procedures and returns an object. This object replaces the function
call in the continuing evaluation of the expression. You can include function
calls to internal and external routines in an expression anywhere that a data
term (such as a string) would be valid, using the following notation:
The
function_name is a literal string
or a symbol, which is taken as a constant. When it is a symbol,
it can be optionally preceeded by a
namespace
followed by a colon.
There can be any number of expressions, separated by commas,
between the
parentheses. These expressions are called the arguments to the function. Each
argument expression can include further function calls.
Note that the left parenthesis must be adjacent to the name of the function,
with no whitespace characters in between. (A blank operator would be assumed at
this point instead.) Only a standard comment can appear between the name and the left
parenthesis.
The arguments
are evaluated in turn from left to right and the resulting
objects are then all passed to the function. This function then runs some
operation (usually dependent on the argument objects passed, though arguments
are not mandatory) and eventually returns a single object. This object is
then included in the original expression as though the entire function reference
had been replaced by the name of a variable whose value is the returned object.
For example, the function SUBSTR is built into the language processor and
could be used as:
N1="abcdefghijk"
Z1="Part of N1 is: "substr(N1,2,7)
/* Sets Z1 to "Part of N1 is: bcdefgh" */
A function can have a variable number of arguments. You need to specify only those
required. For example,
SUBSTR("ABCDEF",4)
would return
DEF.