IANY intrinsic function

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

IANY ( ARRAY, DIM [ , MASK ] )
IANY ( ARRAY [ , MASK ] )

ARRAY : rank N array of type Integer;
DIM : scalar Integer in the range 1 to N;
MASK : array of type Logical with the same shape as ARRAY;

Result: Same type and kind as ARRAY.

<Semantics>

The result is ARRAY reduced by bitwise or (the IOR intrinsic function). If DIM is absent, this is a scalar equal to the bitwise or of all the masked elements of ARRAY. If DIM is present, the result has rank N−1 and the shape of ARRAY with dimension DIM removed; each element of the result is the bitwise or of the masked elements in that dimension.

If no elements contribute to a result value, that value is zero.

<Related>

Array-array operations, Array-scalar operations, ALL intrinsic function, ANY intrinsic function, COUNT intrinsic function, IALL intrinsic function, IOR intrinsic function, IPARITY intrinsic function, MAXLOC intrinsic function, MAXVAL intrinsic function, MINLOC intrinsic function, MINVAL intrinsic function, PARITY intrinsic function, PRODUCT intrinsic function, Reduction intrinsic functions, SUM intrinsic function