COBOL Manual for TNS and TNS/R Programs

Intrinsic Functions
HP COBOL Manual for TNS and TNS/R Programs522555-006
14-35
MIN Function
MIN Function
MIN is a function that returns the value of its minimum argument. Its type depends on
the type of its arguments, as this table shows:
argument
is an alphabetic, alphanumeric, integer, or numeric argument. If you specify more
than one argument, they must all be of the same class. Integer and numeric
arguments can be mixed, because integers are of the class numeric.
argument can be an array; for example,
FUNCTION MIN (ARRAY1(ALL))
returns the smallest element of the array ARRAY1.
The returned value is the argument with the least value (according to the rules for
evaluating simple conditions). If the function type is alphanumeric, the size of the
returned value is the same as that of the argument with the least value. If two
arguments have the same least value, the value of the leftmost argument is returned.
Argument Type Function Type
Alphabetic Alphanumeric
Alphanumeric Alphanumeric
Integer Integer
Numeric (some can be integer) Numeric
( )
MINFUNCTION argument
VST443.vsd