NET/MASTER Network Control Language (NCL) Programmer's Guide
Sharing Variables to Procedures and Functions
Procedures and Functions
106160 Tandem Computers Incorporated 6–39
Using Two NOSHARE Keywords
If both the caller and callee have specified a list of variables that are not to be shared
using the NOSHARE keyword, then all variables are shared except those that are the
union of both NOSHARE lists.
The following example shows how specifying the NOSHARE keyword on both a
procedure declaration and a procedure call affects variable sharing:
zex0620n: PROCEDURE
/* Two NOSHARE keywords */
/* Default is CONTROL NOSHRVARS */
&var_1 = One
&var_2 = 1
&var_3 = First
&var_4 = Begin
SAY "Pre-procedure call vars are "&var_1,
&var_2,
&var_3,
&var_4
CALL control_proc
SAY "Post-procedure call vars are "&var_1,
&var_2,
&var_3,
&var_4
CALL control_proc NOSHARE &var_1, &var_2
SAY "Post-procedure call vars are "&var_1,
&var_2,
&var_3,
&var_4
control_proc: PROCEDURE NOSHARE &var_2, &var_3
&var_1 = Two
&var_2 = 2
&var_3 = Last
&var_4 = End
END control_proc
END zex0620n