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

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

Contents


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

NAME    [Toc]    [Back]

     SHIFTA - Performs an arithmetic shift

SYNOPSIS    [Toc]    [Back]

     SHIFTA ([I=]i, [J=]j)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     The SHIFTA	intrinsic function performs a right shift with sign
     extension fill of the object i by j.  Its arguments are as	follows:

     i	  The value to be shifted.  Must be of type Boolean, integer, real,
	  or Cray pointer.

     j	  The number of	bits to	shift the value.  Must be of type integer
	  or Boolean.  j must be within	the range 0 <= j <= size, where
	  size is the size, in bits, of	i.  That is, if	i is a 64-bit
	  object, j must be within the range 0 <= j <= 64.

     For values	of j outside these ranges, SHIFTA returns an undefined
     result.

     On	UNICOS systems,	an object is 64	bits.  On UNICOS/mk systems, an
     object is 32 bits or 64 bits.  On IRIX systems, an	object is 8 bits,
     16	bits, 32 bits, or 64 bits.

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

NOTES    [Toc]    [Back]

     The bit representation of the logical data	type is	not consistent
     among Cray	Research systems.  For further details,	see the	Fortran
     Language Reference	Manual,	Volume 3, publication SR-3905.

RETURN VALUES    [Toc]    [Back]

     SHIFTA returns a value of type Boolean on UNICOS and UNICOS/mk
     systems.  It returns an integer result on IRIX systems.

EXAMPLES    [Toc]    [Back]

     The following section of Fortran code shows the SHIFTA function used
     in	the case where i is of type integer.  The bit pattern of i and the
     bit pattern of the	result are shown.  For clarity,	a 16-bit value is
     used rather than a	64-bit value.

	  INTEGER I1, I2, I3
	  ...
	  I2 = 5
	  I3 = SHIFTA(I1,I2)

	---------------------------------------------------------------
       | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
	---------------------------------------------------------------
			   I1 (i)

	---------------------------------------------------------------
       | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
	---------------------------------------------------------------
			   I3 (result)

SEE ALSO    [Toc]    [Back]

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

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

NAME    [Toc]    [Back]

     SHIFTA - Performs an arithmetic shift

SYNOPSIS    [Toc]    [Back]

     SHIFTA ([I=]i, [J=]j)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     CF90 and MIPSpro 7	Fortran	90 compiler extension to Fortran 90

DESCRIPTION    [Toc]    [Back]

     The SHIFTA	intrinsic function performs a right shift with sign
     extension fill of the object i by j.  Its arguments are as	follows:

     i	  The value to be shifted.  Must be of type Boolean, integer, real,
	  or Cray pointer.

     j	  The number of	bits to	shift the value.  Must be of type integer
	  or Boolean.  j must be within	the range 0 <= j <= size, where
	  size is the size, in bits, of	i.  That is, if	i is a 64-bit
	  object, j must be within the range 0 <= j <= 64.

     For values	of j outside these ranges, SHIFTA returns an undefined
     result.

     On	UNICOS systems,	an object is 64	bits.  On UNICOS/mk systems, an
     object is 32 bits or 64 bits.  On IRIX systems, an	object is 8 bits,
     16	bits, 32 bits, or 64 bits.

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

NOTES    [Toc]    [Back]

     The bit representation of the logical data	type is	not consistent
     among Cray	Research systems.  For further details,	see the	Fortran
     Language Reference	Manual,	Volume 3, publication SR-3905.

RETURN VALUES    [Toc]    [Back]

     SHIFTA returns a value of type Boolean on UNICOS and UNICOS/mk
     systems.  It returns an integer result on IRIX systems.

EXAMPLES    [Toc]    [Back]

     The following section of Fortran code shows the SHIFTA function used
     in	the case where i is of type integer.  The bit pattern of i and the
     bit pattern of the	result are shown.  For clarity,	a 16-bit value is
     used rather than a	64-bit value.

	  INTEGER I1, I2, I3
	  ...
	  I2 = 5
	  I3 = SHIFTA(I1,I2)

	---------------------------------------------------------------
       | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
	---------------------------------------------------------------
			   I1 (i)

	---------------------------------------------------------------
       | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
	---------------------------------------------------------------
			   I3 (result)

SEE ALSO    [Toc]    [Back]

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

[ Back ]
 Similar pages
Name OS Title
shiftr IRIX Performs a right shift with zero fill
dshiftr IRIX Performs a double-object right shift
shift IRIX Performs a left circular shift
eoshift IRIX Performs an end-off shift on an array expression
shiftl IRIX Performs a left shift with zero fill
dshiftl IRIX Performs a double-object left shift
cshift IRIX Performs a circular shift on an array expression
sem_wait Tru64 Performs (or conditionally performs) a semaphore lock (P1003.1b)
sem_trywait Tru64 Performs (or conditionally performs) a semaphore lock (P1003.1b)
mbsinit Linux test for initial shift state
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service