NET/MASTER Network Control Language (NCL) Programmer's Guide
Calling Procedures and Functions
Procedures and Functions
106160 Tandem Computers Incorporated 6–47
Function Name Syntax and Search Order
The following table summarizes how the syntax of a function name affects how NCL
searches for it; the table shows that the search order is affected by the use of quotes
(“ ”) and parentheses (( )) around the function name:
Function Name Syntax Comment Search Order
function-name
(…) The function name must be a
valid symbol.
1. Internal function label.
2. Built-in function name.
3. External function name.
"
function-name
"(…) With quotes. The function
name must be a valid symbol
within the quotes. Allows
you to call a built-in function
even if a user-written function
exists in the same scope.
1. Built-in function name.
2. External function name.
(
expression
)(…) With parentheses. The
expression is either a
function name (a valid
symbol) or an expression
that resolves to a function
name. Allows dynamic
function calls.
1. Internal function label.
2. External function name.
For example, the following function call searches for an internal function label and
then, if the label is not found, for a built-in function and then, if the built-in function is
not found, for an external function name:
&a = abcfunc(…) /* Internal, built-in, external */
The following function call searches for a built-in function and then, if the built-in
function is not found, for an external function name:
&a = "funcxyz"(…) /* Built-in, external */
The following function call searches for an internal function label and then, if the label
is not found, for an external function name:
&a = (func||&number)(…) /* Internal, external */
The name is determined by the value of the variable &NUMBER, which is
concatenated with FUNC.