·  Home
+   man pages
 -> Linux -> FreeBSD -> OpenBSD -> NetBSD -> Tru64 Unix -> HP-UX 11i -> IRIX
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

man pages->IRIX man pages -> f90/any (3)
 Title
 Content
 Arch
 Section All Sections 1 - General Commands 2 - System Calls 3 - Subroutines 4 - Special Files 5 - File Formats 6 - Games 7 - Macros and Conventions 8 - Maintenance Commands 9 - Kernel Interface n - New Commands

Contents

ANY(3I)						       Last changed: 1-6-98

NAME[Toc][Back]

ANY - Determines whether any values are true

IMPLEMENTATION[Toc][Back]

UNICOS, UNICOS/mk,	and IRIX systems

Fortran 90

DESCRIPTION[Toc][Back]

The ANY intrinsic function	determines whether any value is	true in
argument mask along dimension dim.	 It accepts the	following
arguments:

mask      Must be of type logical.	 It must not be	a scalar.

dim       Must be a scalar.  It must be an	integer	value in the range
1 <= dim	<= n, where n is the rank of mask.  The
corresponding actual argument must not be an optional dummy
argument.

ANY is a transformational function.  The name of this intrinsic cannot
be	passed as an argument.

RETURN VALUES[Toc][Back]

The result	is type	logical.  It is	a scalar result	if dim is absent or
if	mask has rank one.  Otherwise, the result is an	array of rank n-1
and of shape (d , d , ...,	d     ,	d     ,	..., d ),
1	2	 dim-1	 dim+1	      n
where (d ,	d , ..., d )
1	 2	  n

The result	of ANY(mask) has the value TRUE	if any element of mask is
true.  The	result has the value FALSE if no elements of mask are true
or	if mask	is a zero-sized	array.

If	mask has rank one, ANY(mask,dim) has a value equal to that of
element (s	, s , ..., s	 , s	 , ...,	s )
1   2	    dim-1   dim+1	 n
ANY(mask (s , s , ..., s	  , : ,	s     ,	..., s )).
1   2	     dim-1	 dim+1	      n

EXAMPLES[Toc][Back]

Example 1:

* ANY ( (/	.TRUE.,	.FALSE., .TRUE.	/) ) is	.TRUE..

Example 2:	 Assume	that B and C are arrays	as follows:

B is the following	array:

| 1 3 5	|

| 2 4 6	|

C is the following	array:

| 0 3 5	|

| 7 4 8	|

* ANY ( B .NE. C )	is .TRUE..

* ANY ( B .NE. C, DIM=1 ) is [.TRUE., .FALSE., .TRUE.]

* ANY ( B .NE. C, DIM=2 ) is [.TRUE., .TRUE.].

* ANY ( C .EQ. 1 )	is [.FALSE.] because no	elements of the	mask are
true.

Example 3:	 Assume	that array N is	as follows:

| 0 1 2	3 |

| 4 5 6	7 |

| 8 9 0	1 |

In	an array section reference, you	can expect the following results:

* ANY((N(2:3,2:4).NE.0)) is .TRUE.

* ANY((N(2:3,2:4).NE.0),DIM=1) is [.TRUE.,	.TRUE.,	.TRUE.]

* ANY((N(2:3,2:4).NE.0),DIM=2) is [.TRUE.,	.TRUE.]

Intrinsic Procedures Reference Manual, publication	SR-2138, for the
printed version of	this man page.

ANY(3I)						       Last changed: 1-6-98

NAME[Toc][Back]

ANY - Determines whether any values are true

IMPLEMENTATION[Toc][Back]

UNICOS, UNICOS/mk,	and IRIX systems

Fortran 90

DESCRIPTION[Toc][Back]

The ANY intrinsic function	determines whether any value is	true in
argument mask along dimension dim.	 It accepts the	following
arguments:

mask      Must be of type logical.	 It must not be	a scalar.

dim       Must be a scalar.  It must be an	integer	value in the range
1 <= dim	<= n, where n is the rank of mask.  The
corresponding actual argument must not be an optional dummy
argument.

ANY is a transformational function.  The name of this intrinsic cannot
be	passed as an argument.

RETURN VALUES[Toc][Back]

The result	is type	logical.  It is	a scalar result	if dim is absent or
if	mask has rank one.  Otherwise, the result is an	array of rank n-1
and of shape (d , d , ...,	d     ,	d     ,	..., d ),
1	2	 dim-1	 dim+1	      n
where (d ,	d , ..., d )
1	 2	  n

The result	of ANY(mask) has the value TRUE	if any element of mask is
true.  The	result has the value FALSE if no elements of mask are true
or	if mask	is a zero-sized	array.

If	mask has rank one, ANY(mask,dim) has a value equal to that of
element (s	, s , ..., s	 , s	 , ...,	s )
1   2	    dim-1   dim+1	 n
ANY(mask (s , s , ..., s	  , : ,	s     ,	..., s )).
1   2	     dim-1	 dim+1	      n

EXAMPLES[Toc][Back]

Example 1:

* ANY ( (/	.TRUE.,	.FALSE., .TRUE.	/) ) is	.TRUE..

Example 2:	 Assume	that B and C are arrays	as follows:

B is the following	array:

| 1 3 5	|

| 2 4 6	|

C is the following	array:

| 0 3 5	|

| 7 4 8	|

* ANY ( B .NE. C )	is .TRUE..

* ANY ( B .NE. C, DIM=1 ) is [.TRUE., .FALSE., .TRUE.]

* ANY ( B .NE. C, DIM=2 ) is [.TRUE., .TRUE.].

* ANY ( C .EQ. 1 )	is [.FALSE.] because no	elements of the	mask are
true.

Example 3:	 Assume	that array N is	as follows:

| 0 1 2	3 |

| 4 5 6	7 |

| 8 9 0	1 |

In	an array section reference, you	can expect the following results:

* ANY((N(2:3,2:4).NE.0)) is .TRUE.

* ANY((N(2:3,2:4).NE.0),DIM=1) is [.TRUE.,	.TRUE.,	.TRUE.]

* ANY((N(2:3,2:4).NE.0),DIM=2) is [.TRUE.,	.TRUE.]