NET/MASTER Network Control Language (NCL) Reference Manual

MAX
Built-in Functions
106126 Tandem Computers Incorporated 4–55
MAX The MAX built-in function returns the highest number in a set of numbers. Nesting of
the MAX built-in function is permitted. See the second example following.
MAX(
number
[,
number
… ] )
number
specifies the set of numbers to be evaluated. Each number can be an expression.
The number of arguments cannot exceed the NCL limit of 32,000.
Consideration
See also MIN, which returns the lowest number in a set.
Examples
In the following example, the highest number in the following set is 62. This is the
value that is returned:
SAY MAX(12,62,35,23)
The following example shows how the MAX built-in function can be nested. The
value 5000 is assigned to the variable &1, the highest number of the set, and the value
that is returned is 5000. The inner (nested) function results in the highest value of 12
and 55, which is 55. This number then enters the list of numbers to be evaluated by
the outermost MAX built-in function:
&1 = 5000
&A = MAX(-31,2,45)
&RESULT = MAX(78,&1,&A,MAX(12,55))
In the following example, the highest number of the set is .098. This is the value that is
returned:
SAY MAX(.0003,.021,.098,.00005)