NET/MASTER Network Control Language (NCL) Programmer's Guide
4 Initial NCL Procedure
Development
106160 Tandem Computers Incorporated 4–1
This section discusses the fundamentals of NCL procedure development. The section:
Outlines the structure of an NCL procedure
Summarizes tasks associated with writing an NCL procedure
Discusses NCL procedure libraries for source files and object files
Explains how to display information about NCL procedures
This section does not discuss how to execute a procedure. This is covered in Section 8,
“Executing NCL Procedures.”
The Structure of an
NCL Procedure
An NCL procedure is a sequence of NCL statements. NCL lends itself to structured
procedure development. This subsection discusses:
Layout and scope of an NCL procedure
Lines
Statements
Comments
Labels
Empty statements
Layout and Scope of an
NCL Procedure
Figure 4-1 shows the general layout and scope of an NCL procedure. Each procedure
and function in Figure 4-1 is inside a box, which indicates its scope. In Figure 4-1,
some procedures and functions are inside other procedures and functions. This
indicates that you can nest procedures and functions inside other procedures or
functions.
Lines NCL is a free-format, line-based language. With free-format, a line in an NCL
procedure can start in any column. NCL does not restrict the number of lines in an
NCL procedure; however, TEDIT (used by Edit Services) restricts the number of lines
in a TEDIT file.
TEDIT also restricts line length to 239 characters. It is usually most convenient to work
with line lengths of 79 characters, the length of the TEDIT screen display.
You can continue a line over more than one physical line by using the line
continuation character (,) as the last character in a line. You can use the line
continuation character to split lines to improve the readability of the NCL code. The
line continuation character is replaced by a blank during compilation. (During
compilation, the compiler also removes all trailing blanks and comments in a line.)
The following example shows a long line in an NCL procedure:
WRITE ALARM=YES COLOR=PINK HLITE=BLINK NRD=YES DATA=&message