Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

IANY

Transformational Intrinsic Function (Generic): Reduces an array with a bitwise OR operation.

result = IANY (array, dim [, mask])

result = IANY (array [, mask])

array

(Input) Must be an array of type integer.

dim

(Input) Must be a scalar integer with a value in the range 1 <= dim <= n, where n is the rank of array.

mask

(Input; optional) Must be of type logical and conformable with array.

Results

The result has the same type and kind parameters as array. It is scalar if dim does not appear; 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.

The result of IANY (array) is the bitwise OR of all the elements of array. If array has size zero, the result value is equal to zero.

The result of IANY (array, MASK=mask) has a value equal to IANY (PACK (array, mask)).

The result of IANY (array, DIM=dim [ , MASK=mask]) has a value equal to that of IANY (array [ , MASK=mask]) if array has rank one. Otherwise, the value of element (s1, s2, ..., sdim-1, sdim+1 , ..., sn) of the result is equal to IANY (array (s1, s2, ..., sdim-1 , :, sdim+1 , ..., sn) [, MASK = mask (s1, s2, ..., sdim-1 , :, sdim+1 , ..., sn)]).

Example

IANY ([14, 13, 8]) has the value 15. IANY ([14, 13, 8], MASK=[.true., .false., .true]) has the value 14.

See Also