|
|||||
Functions: argument separator ambiguity | |||||
Prerequisite Concepts | Related Syntax |
The argument heralds used in a function's definition cannot be "ambiguous" amongst themselves. For example, the following produces an error:
define function ambig value counter x with value counter y optional with value counter z as ...
The error is that once an argument value for "x" has been found, the herald "with" can either designate the optional argument "y" or the following argument "z".
If two or more arguments can be recognized at the same time then each must have a distinct function argument separator. It is an error for two such arguments to have the same function argument separator.
The rule for determining which arguments can be recognized is:
optional
, then only one argument can be recognized.
optional
, it and all following arguments up until and including the next argument that is not optional
can be recognized.
Prerequisite Concepts Functions Functions: argument classes |
Related Syntax define function optional |
---- |