Function Parameters [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
Function Parameters
Some of the functions require one or more parameters. Function
parameters can be identifiers, arithmetic expressions, or literals. See
the description of each function for specific information about its
parameters.
If a function requires parameters and you do not supply any, or if the
parameters supplied do not comply with all restrictions for parameters to
that function, the value returned by the function is undefined.
Using ALL as a Table Subscript
Some functions allow a variable number of arguments, for example MAX,
MEAN, and SUM. You can pass all the elements of a table to one of these
functions by specifying the table as a parameter with ALL as the table
subscript. See the examples under these functions. See also
"Referencing Table Items with Subscripting" in Chapter 4 . In
multi-dimensional tables, ALL may occur in one or more subscripts.
Precision of Numeric Functions
Some of the numeric functions convert the parameters you pass to
intermediate floating point values to calculate the function result. The
precision of these functions is limited to 15 significant digits. Also,
fractional values may have rounding errors even if the total size of the
argument is less than or equal to 15 digits. For example, using the SUM
function on a table of dollars and cents values, such as PIC S9(9)V99,
might not produce the correct answer. Use of the ROUNDED phrase is
recommended.
See the HP COBOL II/XL Programmer's Guide for more information on
performance and the precision of functions.
MPE/iX 5.0 Documentation