SHIFT man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]

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

NAME
     SHIFT - Performs a left circular shift

SYNOPSIS
     SHIFT ([I=]i,[J=]j)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

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

DESCRIPTION
     SHIFT performs a left circular shift of i by j bits.  It accepts the
     following arguments:

     i	  The value to be shifted.  i can 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, SHIFT 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.

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

NOTES
     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.

     The bit representation of the logical data type is not consistent
     among Cray Research systems.  For further details, see the your
     compiler's reference manuals.

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

EXAMPLES
     The following section of Fortran code shows the SHIFT function used in
     the case where i is of type integer.  For simplicity, a 16-bit object
     is used.  The bit pattern of i and the bit pattern of the result are
     also given.

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

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

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

SEE ALSO
     SHIFTL(3I)

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

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net