NET/MASTER Network Control Language (NCL) Reference Manual

#ALIAS
Panel Control Statements
6–6 106126 Tandem Computers Incorporated
Multiple #ALIAS statements can be specified using the same or different names.
Where the same
name
appears on multiple #ALIAS statements, the variables in
the current VARS list are added to the variables that are specified in the previous
list or lists.
Variables can be included in the ALIAS statement. Variable substitution takes
place before processing the ALIAS statement, using variables available to the NCL
process at the time it issues the PANEL verb.
For further information on the #ALIAS panel control statement, refer to the
NonStop NET/MASTER NCL Programmer’s Guide. It contains many examples of
panel description files and displays. This guide also discusses the differences
between asynchronous and synchronous panel types.
See the PANEL verb in Section 3, “Verbs,” for a table that summarizes return code
values when displaying panels. For a detailed discussion of these codes (returned
in the &SYS.RETCODE system variable), refer to the NonStop NET/MASTER NCL
Programmer’s Guide.
Examples
The statements in the following examples show how #ALIAS is defined in the control
part of the panel description file, and how, in the display part,
name
is used:
#NOTE This panel is called PNL2 and is an example of the #ALIAS statement
#FLD ! TYPE=INPUT CAPS=YES COLOR=&SYS.PANEL.INPHIC INTENS=HIGH
#ALIAS
name
VARS=alternatename* RANGE=(1,4)
#NOTE % High-intensity (output)
#NOTE + Low-intensity (output)
#NOTE _ High-intensity (input)
#NOTE Following this note are the Display statements.
% PANEL PNL2 - Enter data by overwriting the following description fields
!
name
!
name
!
name
!
name
_name
In the panel description file just displayed, the variables that replace successive
occurrences of
name
are
alternatename1
,
alternatename2
,
alternatename3
,
and
alternatename4
. RANGE=(1,4) limits the number of variables that can be used
as aliases to 4. These variables are defined in the NCL procedure that invokes the
panel. In the present case, after four occurrences in the panel of
name
, no further
substitution takes place, and so the last occurrence of
name
in this panel represents
itself. Notice that the long names in the NCL procedure replace the shorter alias
names in the panel description file. Notice also the method of explicitly specifying the
color of the input field.