NET/MASTER Network Control Language (NCL) Programmer's Guide
Introducing NCL Procedures and Functions
Procedures and Functions
106160 Tandem Computers Incorporated 6–7
Figure 6-2 shows the structure of an internal function. The name of the function is
given by the label, TOP_LEVEL_F, before the FUNCTION core statement. The END
core statement explicitly terminates the declaration of the function. The NCL
statements between the FUNCTION and END statements form the body of the
function.
Figure 6-2. Structure of an Internal, User-Written Function
top_level_f: FUNCTION
statement1
statement2
statement3
…
END top_level_f
Nested Internal Procedures and Internal, User-Written Functions
You can nest procedures and functions, that is, include internal procedures and
functions within internal procedures and functions. NCL supports up to 256 levels of
nesting.
The procedure or function that encloses all other procedures and functions is called the
top-level procedure or function.
Note A source file of NCL statements must contain only one top-level procedure or function.