|
|||||
|
|||||
Related Syntax | |||||
declaration/definition |
elsewhere |
Syntax
define function function-name (local declarations)* elsewhere
Provides a structure to allow mutually recursive functions to call one another.
To support this, OmniMark provides a function "pre-definition", which looks like a function definition with no body. Instead of using as
with a set of local declarations and actions, the definition elsewhere
is used.
Functions must be defined or pre-defined before they are used. For mutually recursive functions, one or more of the functions must be pre-defined prior to the first actual function definition.
The argument names in elsewhere
definitions don't have to be the same as in their later definitions.
elsewhere
definitions no longer need to and shouldn't specify initial
values for their optional
arguments. initial
values should only be specified on the "proper" definition of a function.
For backwards compatibility, optional
arguments on elsewhere
definitions of functions properly defined later can have an initial
value, but only if all specifications of that initial
value are static not dynamic values, and only if all the values are the same.
Related Syntax define function |