NET/MASTER Network Control Language (NCL) Programmer's Guide
Getting Started With NCL Procedures
An NCL Tutorial
3–20 106160 Tandem Computers Incorporated
The Unquoted String—world
Quotes are not needed for “world.” It has only alphabetic characters. It is another
type of lexical element called an unquoted string.
The Assignment Statements
HELLO2 has two assignment statements. An assignment statement assigns the value
on the right side of an equal sign (=) to the variable on the left side of the equal sign.
In HELLO2, the first assignment statement assigns the value of “hello,” to &1 and the
second assignment statement assigns the value of “world” to &2.
The WRITE Verb
WRITE is a verb. DATA is a verb keyword. The DATA keyword must be followed by
an expression containing the text of a message. The expression can be constant or
variable; in HELLO2, the DATA keyword is followed by a variable expression.
WRITE can do many things with the expression following DATA. One thing WRITE
can do is send the expression following DATA to the message display area of an OCS
window. This function of WRITE is identical to the function of SAY. The HELLO3
NCL procedure later in this section explores some more functions of WRITE.
The HELLO3 NCL
Procedure
The final HELLO NCL procedure we will create is called HELLO3, as shown in the
following listing:
hello_world: PROCEDURE
&1 = "hello,"
&2 = world
WRITE HLITE=BLINK,
COLOR=RED,
INTENS=HIGH,
ALARM=YES,
NRD=OPER,
DATA=&1 &2
END hello_world
Follow the steps described earlier in this section to create, test compile, correct, and
execute HELLO3. When executed, this NCL procedure displays the following
message in the OCS message display area:
hello, world
The WRITE verb changes the attributes of the message to enhance its appearance.
HELLO3 illustrates the power of the WRITE verb.