These are all generalized array reduction functions in which completely general, but nonoverlapping, subsets of array elements can be combined. There is a corresponding scatter function for each of the twelve reduction operation in the language. The way the elements of the source array are associated with the elements of the result is described in this section; the method of combining their values is described in the specifications of the individual functions in Section .

These functions all have the form
XXX_SCATTER(ARRAY, BASE, INDX1, ..., INDXn, MASK)
The allowed values of `XXX` are
`ALL`,
`ANY`,
`COPY`,
`COUNT`,
`IALL`,
`IANY`,
`IPARITY`,
`MAXVAL`,
`MINVAL`,
`PARITY`,
`PRODUCT`, and
`SUM`.
The number of `INDX` arguments must equal the rank of `BASE`.
Except for `COUNT_SCATTER`, `ARRAY` and `BASE` are arrays
of the same type. For `COUNT_SCATTER`, `ARRAY` is of type
logical and `BASE` is of type integer. The argument `MASK` is
logical, and the `INDX` arrays are integer. `ARRAY`, `MASK`, and all the `INDX` arrays are conformable. `MASK` is optional.
(For `ALL_SCATTER`, `ANY_SCATTER`, `COUNT_SCATTER`,and `PARITY_SCATTER`, the `ARRAY` must be logical. These functions do
not have an optional `MASK` argument. To conform with the
conventions of the F90 standard, the required `ARRAY` argument to
these functions is called `MASK` in their specifications in
Section .)
The result has the same type, kind type parameter, and
shape as `BASE`.

thenAis the array , 1, 2, 3 4, 5, 6 7, 8, 9 ,, plus 1filll -1; 1, 2, 3 4, 5, 6 7, 8, 9 ,; plus 1filll -1: 1, 2, 3 4, 5, 6 7, 8, 9 ,: plus 1filll -1.plus 1filll 1, 2, 3 4, 5, 6 7, 8, 9 ,.-50 1, 2, 3 4, 5, 6 7, 8, 9 , plus 1filll-1;Bis the array , -1, -2, -3 -4, -5, -6 -7, -8, -9 ,, plus 1filll -1; -1, -2, -3 -4, -5, -6 -7, -8, -9 ,; plus 1filll -1: -1, -2, -3 -4, -5, -6 -7, -8, -9 ,: plus 1filll -1.plus 1filll -1, -2, -3 -4, -5, -6 -7, -8, -9 ,.-50 -1, -2, -3 -4, -5, -6 -7, -8, -9 , plus 1filll-1;I1is the array , 1, 1, 1 2, 1, 1 3, 2, 1 ,, plus 1filll -1; 1, 1, 1 2, 1, 1 3, 2, 1 ,; plus 1filll -1: 1, 1, 1 2, 1, 1 3, 2, 1 ,: plus 1filll -1.plus 1filll 1, 1, 1 2, 1, 1 3, 2, 1 ,.-50 1, 1, 1 2, 1, 1 3, 2, 1 , plus 1filll-1;I2is the array , 1, 2, 3 1, 1, 2 1, 1, 1 ,, plus 1filll -1; 1, 2, 3 1, 1, 2 1, 1, 1 ,; plus 1filll -1: 1, 2, 3 1, 1, 2 1, 1, 1 ,: plus 1filll -1.plus 1filll 1, 2, 3 1, 1, 2 1, 1, 1 ,.-50 1, 2, 3 1, 1, 2 1, 1, 1 , plus 1filll-1

IfSUM_SCATTER(A, B, I1, I2)is , 14, 6, 0 8, -5, -6 0, -8, -9 ,, plus 1filll -1; 14, 6, 0 8, -5, -6 0, -8, -9 ,; plus 1filll -1: 14, 6, 0 8, -5, -6 0, -8, -9 ,: plus 1filll -1.plus 1filll 14, 6, 0 8, -5, -6 0, -8, -9 ,.-50 14, 6, 0 8, -5, -6 0, -8, -9 , plus 1filll-1;SUM_SCATTER(A, B, 2, I2)is , -1, -2, -3 30, 3, -3 -7,-8,-9 ,, plus 1filll -1; -1, -2, -3 30, 3, -3 -7,-8,-9 ,; plus 1filll -1: -1, -2, -3 30, 3, -3 -7,-8,-9 ,: plus 1filll -1.plus 1filll -1, -2, -3 30, 3, -3 -7,-8,-9 ,.-50 -1, -2, -3 30, 3, -3 -7,-8,-9 , plus 1filll-1;SUM_SCATTER(A, B, I1, 2)is , -1, 24, -3 -4, 7, -6 -7, -1, -9 ,, plus 1filll -1; -1, 24, -3 -4, 7, -6 -7, -1, -9 ,; plus 1filll -1: -1, 24, -3 -4, 7, -6 -7, -1, -9 ,: plus 1filll -1.plus 1filll -1, 24, -3 -4, 7, -6 -7, -1, -9 ,.-50 -1, 24, -3 -4, 7, -6 -7, -1, -9 , plus 1filll-1;SUM_SCATTER(A, B, 2, 2)is , -1, -2, -3 -4, 40, -6 -7, -8, -9 ,, plus 1filll -1; -1, -2, -3 -4, 40, -6 -7, -8, -9 ,; plus 1filll -1: -1, -2, -3 -4, 40, -6 -7, -8, -9 ,: plus 1filll -1.plus 1filll -1, -2, -3 -4, 40, -6 -7, -8, -9 ,.-50 -1, -2, -3 -4, 40, -6 -7, -8, -9 , plus 1filll-1.

Thu Dec 8 16:17:11 CST 1994