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


SUM

The SUM function returns a value that is the sum of the arguments.

The function type depends on the argument types, as follows:

Argument type Function type
All arguments integer Integer
Numeric (some arguments can be integer) Numeric
Read syntax diagramSkip visual syntax diagram
Format

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

argument-1
Must be class numeric.

The returned value is the sum of the arguments. If the argument-1 series are all integers, the value returned is an integer. If the argument-1 series are not all integers, a numeric value is returned.


Terms of use | Feedback

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