Fortran Wiki
ishft

Description

ishft returns a value corresponding to i with all of the bits shifted shift places. A value of shift greater than zero corresponds to a left shift, a value of zero corresponds to no shift, and a value less than zero corresponds to a right shift. If the absolute value of shift is greater than bit_size(i), the value is undefined. Bits shifted out from the left end or right end are lost; zeros are shifted in from the opposite end.

Standard

Fortran 95 and later

Class

Elemental function

Syntax

result = ishft(i, shift)

Arguments

  • i - The type shall be integer.
  • shift - The type shall be integer.

Return value

The return value is of type integer and of the same kind as i.

See also

ishftc

category: intrinsics