The RANGE Function
The RANGE function returns a value that is equal to the value of the maximum
argument minus the value of the minimum argument. The type of this function
depends upon the argument types as follows:
Argument Type |
Function Type |
All arguments integer |
Integer |
Numeric |
Numeric |
(some arguments can be integer) |
|
General Format

Arguments
- Argument-1 must be class numeric.
Returned Values
- The returned value is equal to the greatest value of argument-1 minus the
least value of argument-1.
- The comparisons used to determine the greatest and least values are made
according to the rules for relation conditions. See the topic Relation Condition
in the chapter Procedure Division.
- If the value of argument-1 is numeric non-integer, results are returned in
floating-point format.