*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/mask (3)              
Title
Content
Arch
Section
 

Contents


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

NAME    [Toc]    [Back]

     _mask, _maskl, _maskr, MASK - Returns a bit mask

SYNOPSIS    [Toc]    [Back]

     C/C++:

     #include <intrinsics.h>
     long _mask	(long i);
     long _maskl (long i);
     long _maskr (long i);

     Fortran:

     MASK ([I=]i)

IMPLEMENTATION    [Toc]    [Back]

     C/C++:  UNICOS and	UNICOS/mk systems

     Fortran:  UNICOS, UNICOS/mk, and IRIX systems

STANDARDS    [Toc]    [Back]

     C/C++:  Cray Research extension

     Fortran:  CF90 and	MIPSpro	7 Fortran 90 compiler extension	to Fortran
     90

C/C++ DESCRIPTION
     The _mask function	forms a	mask of	bits set to 1, left-justified or
     right-justified.  If 0 <= i <= 63,	a left-justified mask of bits set
     to	1, i bits long,	is formed.  Otherwise, a right-justified mask of
     bits set to 1, (128 - i) bits long, is formed.  Value i must be in	the
     range of 0	through	128.

     The _maskl	function returns a left-justified mask of i bits set to	1.
     Value i must be in	the range of 0 through 64.

     The _maskr	function returns a right-justified mask	of i bits set to 1.
     Value i must be in	the range of 0 through 64.

     Because these are intrinsic functions, no externally visible library
     functions are available for them.	The compiler generates inline code
     to	produce	the result.

FORTRAN	DESCRIPTION
     The MASK function returns a bit mask of 1's.

     On	UNICOS systems,	the argument is	a 64-bit integer.

     On	UNICOS/mk systems, the argument	is a 32-bit or 64-bit integer.

     On	IRIX systems, the argument is an 8-bit,	16-bit,	32-bit,	or 64-bit
     integer.

     It	accepts	the following argument:

     i	  In Fortran, this must	be an integer argument,	as follows:

	  * If i is an 8-bit object, i must be in the range 0 <= i <= 16.

	  * If i is a 16-bit object, i must be in the range 0 <= i <= 32.

	  * If i is a 32-bit object, i must be in the range 0 <= i <= 64.

	  * If i is a 64-bit object, i must be in the range 0 <= i <= 128.

     MASK is an	elemental function.  The name of this function cannot be
     passed as an argument.

     This is an	outmoded routine.  Refer to the	Fortran	Language Reference
     Manual, Volume 2, publication SR-3903, for	information about outmoded
     features and their	preferred standard alternatives.

RETURN VALUES    [Toc]    [Back]

     In	C/C++, the mask	functions return a 64-bit object.

     In	Fortran, MASK returns a	Boolean	result on UNICOS and UNICOS/mk
     systems.  It returns an integer result on IRIX systems.

     When i is a 64-bit	object,	the return values are of the following
     form:

     * If i is in the range 0 <= i <= 64, a left-justified mask	of i bits
       is returned.

     * If i is in the range 65 <= i <= 128, a right-justified mask of (128
       - i) bits is returned.

     When i is a 32-bit	object,	the return values are of the following
     form:

     * If i is in the range 0 <= i <= 32, a left-justified mask	of i bits
       is returned.

     * If i is in the range 33 <= i <= 64, a right-justified mask of (64 -
       i) bits is returned.

     When i is a 16-bit	object,	the return values are of the following
     form:

     * If i is in the range 0 <= i <= 16, a left-justified mask	of i bits
       is returned.

     * If i is in the range 17 <= i <= 32, a right-justified mask of (32 -
       i) bits is returned.

     When i is a 8-bit object, the return values are of	the following form:

     * If i is in the range 0 <= i <= 8, a left-justified mask of i bits is
       returned.

     * If i is in the range 7 <= i <= 16, a right-justified mask of (16	-
       i) bits is returned.

EXAMPLES    [Toc]    [Back]

     Fortran:  The following section of	Fortran	code shows the MASK
     function used with	several	different arguments.  The bit patterns of
     the results are given.

	  INTEGER I1, I2, I3
	  ...
	  I1 = MASK(3)
	  I2 = MASK(64)
	  I3 = MASK(127)

	   -----------------------------------------------------
	  | 1 |	1 | 1 |	0 | 0 |	0 | 0 |	   ...	  | 0 |	0 | 0 |
	   -----------------------------------------------------
				     I1

	   ---------------------------------------------
	  | 1 |	1 | 1 |	1 |    ...    |	1 | 1 |	1 | 1 |
	   ---------------------------------------------
			      I2

	   ---------------------------------------------
	  | 0 |	0 | 0 |	0 |    ...    |	0 | 0 |	0 | 1 |
	   ---------------------------------------------
			      I3

SEE ALSO    [Toc]    [Back]

      
      
     A complete	list of	C/C++ intrinsic	functions available on Cray
     Research systems is in the	Cray C/C++ Reference Manual, publication SR
     -2179.

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

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

NAME    [Toc]    [Back]

     _mask, _maskl, _maskr, MASK - Returns a bit mask

SYNOPSIS    [Toc]    [Back]

     C/C++:

     #include <intrinsics.h>
     long _mask	(long i);
     long _maskl (long i);
     long _maskr (long i);

     Fortran:

     MASK ([I=]i)

IMPLEMENTATION    [Toc]    [Back]

     C/C++:  UNICOS and	UNICOS/mk systems

     Fortran:  UNICOS, UNICOS/mk, and IRIX systems

STANDARDS    [Toc]    [Back]

     C/C++:  Cray Research extension

     Fortran:  CF90 and	MIPSpro	7 Fortran 90 compiler extension	to Fortran
     90

C/C++ DESCRIPTION
     The _mask function	forms a	mask of	bits set to 1, left-justified or
     right-justified.  If 0 <= i <= 63,	a left-justified mask of bits set
     to	1, i bits long,	is formed.  Otherwise, a right-justified mask of
     bits set to 1, (128 - i) bits long, is formed.  Value i must be in	the
     range of 0	through	128.

     The _maskl	function returns a left-justified mask of i bits set to	1.
     Value i must be in	the range of 0 through 64.

     The _maskr	function returns a right-justified mask	of i bits set to 1.
     Value i must be in	the range of 0 through 64.

     Because these are intrinsic functions, no externally visible library
     functions are available for them.	The compiler generates inline code
     to	produce	the result.

FORTRAN	DESCRIPTION
     The MASK function returns a bit mask of 1's.

     On	UNICOS systems,	the argument is	a 64-bit integer.

     On	UNICOS/mk systems, the argument	is a 32-bit or 64-bit integer.

     On	IRIX systems, the argument is an 8-bit,	16-bit,	32-bit,	or 64-bit
     integer.

     It	accepts	the following argument:

     i	  In Fortran, this must	be an integer argument,	as follows:

	  * If i is an 8-bit object, i must be in the range 0 <= i <= 16.

	  * If i is a 16-bit object, i must be in the range 0 <= i <= 32.

	  * If i is a 32-bit object, i must be in the range 0 <= i <= 64.

	  * If i is a 64-bit object, i must be in the range 0 <= i <= 128.

     MASK is an	elemental function.  The name of this function cannot be
     passed as an argument.

     This is an	outmoded routine.  Refer to the	Fortran	Language Reference
     Manual, Volume 2, publication SR-3903, for	information about outmoded
     features and their	preferred standard alternatives.

RETURN VALUES    [Toc]    [Back]

     In	C/C++, the mask	functions return a 64-bit object.

     In	Fortran, MASK returns a	Boolean	result on UNICOS and UNICOS/mk
     systems.  It returns an integer result on IRIX systems.

     When i is a 64-bit	object,	the return values are of the following
     form:

     * If i is in the range 0 <= i <= 64, a left-justified mask	of i bits
       is returned.

     * If i is in the range 65 <= i <= 128, a right-justified mask of (128
       - i) bits is returned.

     When i is a 32-bit	object,	the return values are of the following
     form:

     * If i is in the range 0 <= i <= 32, a left-justified mask	of i bits
       is returned.

     * If i is in the range 33 <= i <= 64, a right-justified mask of (64 -
       i) bits is returned.

     When i is a 16-bit	object,	the return values are of the following
     form:

     * If i is in the range 0 <= i <= 16, a left-justified mask	of i bits
       is returned.

     * If i is in the range 17 <= i <= 32, a right-justified mask of (32 -
       i) bits is returned.

     When i is a 8-bit object, the return values are of	the following form:

     * If i is in the range 0 <= i <= 8, a left-justified mask of i bits is
       returned.

     * If i is in the range 7 <= i <= 16, a right-justified mask of (16	-
       i) bits is returned.

EXAMPLES    [Toc]    [Back]

     Fortran:  The following section of	Fortran	code shows the MASK
     function used with	several	different arguments.  The bit patterns of
     the results are given.

	  INTEGER I1, I2, I3
	  ...
	  I1 = MASK(3)
	  I2 = MASK(64)
	  I3 = MASK(127)

	   -----------------------------------------------------
	  | 1 |	1 | 1 |	0 | 0 |	0 | 0 |	   ...	  | 0 |	0 | 0 |
	   -----------------------------------------------------
				     I1

	   ---------------------------------------------
	  | 1 |	1 | 1 |	1 |    ...    |	1 | 1 |	1 | 1 |
	   ---------------------------------------------
			      I2

	   ---------------------------------------------
	  | 0 |	0 | 0 |	0 |    ...    |	0 | 0 |	0 | 1 |
	   ---------------------------------------------
			      I3

SEE ALSO    [Toc]    [Back]

      
      
     A complete	list of	C/C++ intrinsic	functions available on Cray
     Research systems is in the	Cray C/C++ Reference Manual, publication SR
     -2179.

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

[ Back ]
 Similar pages
Name OS Title
getscrmask IRIX returns the current screen mask
sigsetmask NetBSD set current signal mask
ffs Tru64 General: Finds the first set bit in a mask
sigsetmask OpenBSD set current signal mask
umask IRIX set and get file creation mask
sigsetmask Tru64 Set the current signal mask
acl_calc_mask FreeBSD calculate and set ACL mask permissions
sigprocmask Tru64 Set the current signal mask
merge IRIX Chooses an alternative value according to the value of a mask
sigblock Linux manipulate the signal mask
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service