ALL
Platform  x64, Win32, .NET 
Purpose

To test if all the elements in a logical array are true.

Class

Transformational function.

Syntax

LOGICAL FUNCTION ALL(MASK [,DIM])
LOGICAL MASK
INTEGER DIM

Description

MASK is a logical array. DIM is optional and is a value in the range 1
< DIM < n where n is the rank (i.e. the number of
dimensions) of MASK. ALL returns a logical array or scalar whose kind type is
the same as an element of MASK. If MASK has rank 1 or if DIM is not present
then ALL returns a scalar otherwise ALL returns an array whose rank is one less
than that of MASK. If MASK has rank 1 then a supplied value of DIM is ignored.

Return value

ALL(MASK) returns the scalar value true if all the elements of MASK are true. It
returns false if any element of MASK is false.
If MASK has rank n greater than 1 then ALL(MASK, DIM) returns a logical array of
rank n  1 whose elements are given by ALL(MASK) applied along dimension DIM.

Example

If MASK =
then ALL(MASK, 1) returns [true, true, false]
whilst ALL(MASK, 2) returns [false, true]


