VMS Help  —  FORTRAN  Intrinsic Procedures, ANY
  ANY (mask [,dim])

  Class:  Transformational function - Generic

  Determines if any value is true in an entire array or in a
  specified dimension of an array.

  The "mask" must be a logical array.  The "dim" must be a scalar
  integer with a value in the range 1 to n, where "n" is the rank of
  "mask".

  The result is a logical array with the same kind type parameter as
  "mask".  The result is scalar if "dim" is absent or "mask" has rank
  one.  Otherwise, the result is an array with rank that is one less
  than "mask", and shape (d1, d2,..., d"dim"-1, d"dim"+1,..., dn),
  where (d1, d2,..., dn) is the shape of "mask".

  The result of ANY (mask) has the value true if any elements of
  "mask" are true.  The result has the value false if no element of
  "mask" is true or "mask" has size zero.

  If "mask" has rank one, ANY (mask, dim) has the same value as ANY
  (mask).  Otherwise, the value of element (s1, s2,..., s"dim"-1,
  s"dim"+1,..., sn) of ANY (mask, dim) is equal to ANY (mask (s1,
  s2,..., s"dim"-1, :, s"dim"+1, ..., sn).

  Examples:

  ANY ((/.FALSE., .FALSE., .TRUE./)) has the value true.

  Consider the following arrays:

    Array A       Array B

    |1 5 7|       |0 5 7|
    |3 6 8|       |2 6 9|

  ANY (A .NE.  B, DIM=1) has the value (true, false, true).

  ANY (A .NE.  B, DIM=2) has the value (true, true).
Close Help