Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section


Adds the values of the elements of a multi-level dynamic array.




dynarray An expression that resolves to a dynamic array of numeric values.


The SUMMATION function adds the values of all of the elements in a dynamic array and returns the sum. If an element is missing, or has a null string or a non-numeric value, SUMMATION parses its value as 0 (zero).

The SUMMATION function adds all dynamic array values, regardless of dynamic array levels of the elements. To add only those elements that are on the same dynamic array level, use the SUM function. To add the elements of two dynamic arrays, use the ADDS function.


The following example uses the SUMMATION function to add the elements of a dynamic array:

PRINT SUMMATION(a);     ! returns 34
Copy code to clipboard

See Also