Rational Developer for System z
COBOL for Windows, Version 7.5, 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.

Format
Read syntax diagramSkip visual syntax diagram                         .------------.     
                         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

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)