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

Terminating Execution of the Current Procedure or Function
Procedures and Functions
106160 Tandem Computers Incorporated 6–17
placed in the variable &2. Both parameters are passed to the ROOTN function when
the function is called. The values are checked by the built-in function, TYPECHK. If
both parameters are numbers, the ROOTN function calculates the root of the first
parameter using the second parameter. The ROOTN function returns the result (or an
error message) using a RETURN statement. The SAY statement displays the result of
the ROOTN function in the OCS message display area.
The following screen shows the results of executing the procedure four times:
(09:34) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0609N 64 3
First parameter is 64
Second parameter is 3
The Nth root of 64 where N=3 is 4
NNM1005 START ZEX0609N PROCESSING COMPLETE. NCLID 001018
START ZEX0609N 1331 3
First parameter is 1331
Second parameter is 3
The Nth root of 1331 where N=3 is 11
NNM1005 START ZEX0609N PROCESSING COMPLETE. NCLID 001019
START ZEX0609N ABC 2
First parameter is ABC
Second parameter is 2
The Nth root of ABC where N=2 is using invalid arguments
NNM1005 START ZEX0609N PROCESSING COMPLETE. NCLID 001020
START ZEX0609N 64 X
First parameter is 64
Second parameter is X
The Nth root of 64 where N=X is using invalid arguments
NNM1005 START ZEX0609N PROCESSING COMPLETE. NCLID 001021
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The values entered are 64 and 3 (correctly), 1331 and 3 (correctly), ABC and 2
(incorrectly), and 64 and X (incorrectly).