NET/MASTER Network Control Language (NCL) Programmer's Guide
Sharing Variables to Procedures and Functions
Procedures and Functions
106160 Tandem Computers Incorporated 6–41
Using One SHARE Keyword and One NOSHARE Keyword
If either the caller or callee has specified the NOSHARE keyword and the other has
specified the SHARE keyword, the variables shared consist of those specified by the
SHARE keyword less those specified by the NOSHARE keyword.
The following example shows how specifying one SHARE keyword and one
NOSHARE keyword affects variable sharing:
zex0621n: PROCEDURE
 /* One SHARE keyword and one NOSHARE keyword */
 /* 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 SHARE &var_1, &var_2, &var_3
 SAY "Post-procedure call vars are "&var_1,
 &var_2,
 &var_3,
 &var_4
 control_proc: PROCEDURE NOSHARE &var_3, &var_4
 &var_1 = Two
 &var_2 = 2
 &var_3 = Last
 &var_4 = End
 END control_proc
END zex0621n










