Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


MIDRANGE

The MIDRANGE function returns a numeric value that approximates the arithmetic average of the values of the minimum argument and the maximum argument.

The function type is numeric.

Read syntax diagramSkip visual syntax diagram
Format

                         .------------.      
                         V            |      
>>-FUNCTION MIDRANGE--(----argument-1-+--)---------------------><

argument-1
Must be class numeric.

The returned value is the arithmetic mean of the value of the greatest argument-1 and the value of the least argument-1. The comparisons used to determine the greatest and least values are made according to the rules for simple conditions. For more information, see Conditional expressions.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)