ishft(3I)

ISHFT, IISHFT, JISHFT, KISHFT, LSHIFT, RSHIFT - Performs a logical shift

As shipped in IRIX 6.5.5. Last changed in IRIX 6.5.5.

NAME
     ISHFT, IISHFT, JISHFT, KISHFT, LSHIFT, RSHIFT - Performs a logical
     shift

SYNOPSIS
     ISHFT ([I=]i, [SHIFT=]shift)
     IISHFT ([I=]i, [SHIFT=]shift)
     JISHFT ([I=]i, [SHIFT=]shift)
     KISHFT ([I=]i, [SHIFT=]shift)
     LSHIFT ([I=]i, [SHIFT=]shift)
     RSHIFT ([I=]i, [SHIFT=]shift)

IMPLEMENTATION
     UNICOS, UNICOS/mk, IRIX systems

     CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77

STANDARDS
     Fortran

     Fortran extensions:  IISHFT, JISHFT, KISHFT, LSHIFT, RSHIFT

DESCRIPTION
     The ISHFT, IISHFT, JISHFT, KISHFT, LSHIFT and RSHIFT intrinsic
     functions perform a logical shift.  They accept the following
     arguments:

     i         Must be of type integer.  For IISHFT, must be of type
               integer (KIND=2).  For JISHFT, must be of type integer
               (KIND=4).  For KISHFT, must be of type integer (KIND=8).

     shift     Must be of type integer.  The absolute value of shift must
               be less than or equal to BIT_SIZE(i).

               ISHFT with a positive shift argument can also be specified
               as LSHIFT.  ISHFT with a negative shift argument can also be
               specified as RSHIFT with |shift|.

     These are elemental intrinsic functions.  The names of these
     intrinsics cannot be passed as arguments.

RETURN VALUES
     The result type and type parameters are the same as i.  On IRIX
     systems, the result can be affected by the -i option on the f90(1)
     command line.

     The result has the value obtained by shifting the bits of i by shift
     positions.  If shift is positive, the shift is to the left; if shift
     is negative, the shift is to the right; and if shift is zero, no shift
     is performed.  Bits shifted out from the left or from the right, as
     appropriate, are lost.  Zeros are shifted in from the opposite end.

     LSHIFT and RSHIFT return the value of the first argument shifted left
     or right, respectively, the number of times specified by the shift.
     Zeros are shifted in.

     The bit model defines the interpretation of an integer value as a
     sequence of bits.  For more information on the bit model, see the
     MODELS(3I) man page.

EXAMPLES
     ISHFT(3,1) has the result 6.

SEE ALSO
     f90(1)

     MODELS(3I)

     Intrinsic Procedures Reference Manual for the printed version of this
     man page.