NET/MASTER Network Control Language (NCL) Programmer's Guide

Contents
x 106160 Tandem Computers Incorporated
Section 6 Procedures and Functions
Introducing NCL Procedures and Functions 6-1
Built-in Functions 6-2
External Procedures and External, User-Written Functions 6-6
Internal Procedures and Internal, User-Written Functions 6-6
Declaring Procedures and User-Written Functions 6-9
Explicit Declaration 6-9
Implicit Declaration—Procedures Only 6-11
Terminating Execution of the Current Procedure or Function 6-13
The END Statement—Procedures Only 6-13
The EXIT Statement—Procedures Only 6-14
The RETURN Statement—Procedures and Functions 6-15
Passing Parameters to Procedures and Functions 6-18
Parameter Variables 6-18
The System Variables &SYS.PARMCNT and &SYS.ALLPARMS 6-19
Procedure Declarations and Parameters 6-20
Sharing Variables to Procedures and Functions 6-24
Methods of Variable Sharing 6-24
The Contents of a Share List 6-32
Interaction Between Variable Sharing Methods 6-36
Calling Procedures and Functions 6-43
Calling a Procedure 6-43
Calling a Function 6-45
Procedure and Function Name Syntax and Search Order 6-46
Searching for Procedure and Function Labels 6-48
Section 7 Run-Time Error Handling
Run-Time Errors and Error Messages 7-2
Handling Run-Time Errors 7-3
Writing an Error Handler 7-4
Specifying the Error Condition to Trap 7-4
Writing the Statement to Process the Error 7-6
Recovering From the Error 7-11
Setting an Error Handler 7-14
Raising an Error Handler 7-15