Please enable JavaScript to view this site.

ESL Documentation

MATHLIB Subroutine

Return the sum of values in an integer array.

call SUMINT(ARRAY_IV, SUM_IV)

ARRAY_IV

An integer array identifier.

SUM_IV

The name of an integer variable to hold the result of the subroutine.

Description

Use this subroutine to return the sum of all values in the array.

The SUMINT( ) subroutine can overflow or underflow, in which case its output parameter is set to zero.

Errors

result > largest integer; setting value to 0.

result < smallest integer; setting value to 0.

The result exceeds the largest integer (2147483647) or the smallest integer (-2147483648), so the subroutine set SUM_IV to 0 and placed one of these messages in the ESL errorlog.