9.259. SUM
9.259 SUM — Sum of array elements
- Description:
-
Adds the elements of ARRAY along dimension DIM if the corresponding element in MASK is
TRUE
. - Standard:
-
Fortran 95 and later
- Class:
-
Transformational function
- Syntax:
-
RESULT = SUM(ARRAY[, MASK])
RESULT = SUM(ARRAY, DIM[, MASK])
- Arguments:
-
ARRAY Shall be an array of type INTEGER
,REAL
orCOMPLEX
.DIM (Optional) shall be a scalar of type INTEGER
with a value in the range from 1 to n, where