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

Passing Parameters to Procedures and Functions
Procedures and Functions
6–20 106160 Tandem Computers Incorporated
Procedure Declarations
and Parameters
When you declare a procedure (but not a function), you can specify how you want the
procedure to treat any parameters that are passed to it when the procedure is called.
You can specify how you want NCL to handle the case of alphabetic characters with
the [NO]FOLD keyword. In addition, you can specify how you want NCL to parse
parameters with the EXTPARSE keyword.
Alphabetic Characters in Parameters
The [NO]FOLD keyword specifies whether you want parameters that are passed to a
procedure to be converted (or folded) to uppercase.
The default for the [NO]FOLD keyword depends on the source of the parameters. The
following table summarizes the defaults for the [NO]FOLD keyword:
Source Default Meaning
CALL core statement NOFOLD Alphabetic characters in parameters are not converted to
uppercase.
EXEC command FOLD Alphabetic characters in parameters are converted to
uppercase.
START command FOLD Alphabetic characters in parameters are converted to
uppercase.
START verb FOLD Alphabetic characters in parameters are converted to
uppercase.
The following example shows a procedure declaration that does not specify either
FOLD or NOFOLD:
zex0611n: PROCEDURE
/* Procedure declaration without */
/* FOLD or NOFOLD */
SAY "&1 is "&1
SAY "&2 IS "&2
END zex0611n
The result is that all alphabetic characters in parameters are converted to uppercase by
default when the procedure is executed with a START or EXEC command.