VMS Help  —  FORTRAN  Intrinsic Procedures, ISHFT
  ISHFT (integer, shift)

  Class:  Elemental function - Generic

  Performs a bitwise logical shift - the "shift" is the
  no-of-positions.

  The integer is shifted left (if "shift" is positive) or right (if
  "shift" is negative) by ABS(shift) bits.  If ABS(shift) is greater
  than or equal to the length in bits of the integer argument, the
  result is zero.
  +------+---------+----------+------------+-------------+
  | Args | Generic | Specific |  Argument  | Result Type |
  +------+---------+----------+------------+-------------+
  |  2   |  ISHFT  |   --     | INTEGER*1  | INTEGER*1   |
  |      |         | IISHFT   | INTEGER*2  | INTEGER*2   |
  |      |         | JISHFT   | INTEGER*4  | INTEGER*4   |
  |      |         | KISHFT   | INTEGER*8  | INTEGER*8   |
  +------+---------+----------+------------+-------------+
  Bits shifted out are lost.  Zeros are shifted in from the opposite
  end.
Close Help