ARGUMENTS Declaration
Syntax
ARGUMENTS (argument1), argument2... argumentN
Description
The ARGUMENTS declaration passes values to functions within a user function.
Use the following guidelines to make user functions more powerful by giving them arguments:
-
Enter an ARGUMENTS declaration at the beginning of the rule, followed by an opening parenthesis.
-
Enter any dimension arguments next, separated by commas.
A dimension argument always begins with a
$, as in$Dim. Unlike the built-in functions, which never have more than one dimension argument, user functions can have multiple dimension arguments. -
Include any expression arguments next, separated by commas.
An expression argument always begins with a
@, as in@Expr.To give the argument a default value, follow it with:=and any valid expression.Note:
All optional arguments (that is, those with default values) must appear after all required arguments.
-
Enter a closing parenthesis and a semicolon.
Example
ARGUMENTS($Dim, @ExprToLookup, @Condition, @Direction :=
#FORWARD);FORMEMBERS($Dim, @Direction,
IF(@Condition, RETURN(@ExprToLookup)));RETURN(0)