next up previous contents
Next: IANY_PREFIX(ARRAYDIM, MASK, SEGMENT, Up: Specifications of Library Procedures Previous: IANY(ARRAYDIM, MASK)

IANY(ARRAY, DIM, MASK)

Optional Arguments. DIM, MASK

Description. Computes a bitwise logical OR reduction along dimension DIM of ARRAY.

Class. Transformational function.

Arguments.

ARRAY must be of type integer. It must not be scalar.

DIM (optional) must be scalar and of type integer with a value in the range 1 < DIM < n, where is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.

MASK (optional) must be of type logical and must be conformable with ARRAY.

Result Type, Type Parameter, and Shape. The result is of type integer with the same kind type parameter as ARRAY. It is scalar if DIM is absent or if ARRAY has rank one; otherwise, the result is an array of rank n-1 and shape (d1,d2,...,dDIM-1,dDIM+1,...,dn) where (d1,d2,...,dn) is the shape of ARRAY.

Result Value.

Case (i): The result of IANY(ARRAY) is the IOR reduction of all the elements of ARRAY. If ARRAY has size zero, the result has the value zero. See Section 7.4.3.

Case (ii): The result of IANY(ARRAY, MASK=MASK) is the IOR reduction of all the elements of ARRAY corresponding to the true elements of MASK; if MASK contains no true elements, the result is zero.

Case (iii): If ARRAY has rank one, IANY(ARRAY, DIM [,MASK]) has a value equal to that of IANY(ARRAY [,MASK]). Otherwise, the value of element (s1,s2,...,sDIM-1,sDIM+1,...,sn) of IANY(ARRAY, DIM [,MASK]) is
equal to IANY(ARRAY(s1,s2,...,sDIM-1,:,sDIM+1,...,sn)
[,MASK = MASK(s1,s2,...,sDIM-1,:,sDIM+1,...,sn)])
Examples.

Case (i): The value of IANY((/9, 8, 3, 2/)) is 11.

Case (ii): The value of IANY(C, MASK = BTEST(C,0)) is the IOR reduction of the odd elements of C.

Case (iii):

                  /       \
If B is the array | 2 3 5 |
                  | 0 4 2 |
                  \       /
IANY(B, DIM = 1) is [2 7 7] and IANY(B, DIM = 2) is [7 6].


next up previous contents
Next: IANY_PREFIX(ARRAYDIM, MASK, SEGMENT, Up: Specifications of Library Procedures Previous: IANY(ARRAYDIM, MASK)