DSHIFTL (The GNU Fortran Compiler)

### 8.97 `DSHIFTL` — Combined left shift ¶

Synopsis:

  `RESULT = DSHIFTL(I, J, SHIFT)`

Description:

  `DSHIFTL(I, J, SHIFT)` combines bits of I and J. The rightmost SHIFT bits of the result are the leftmost SHIFT bits of J, and the remaining bits are the rightmost bits of I.

Class:

  Elemental function

Arguments:

  I | Shall be of type `INTEGER`, `UNSIGNED` or a BOZ constant.
  J | Shall be of type `INTEGER`, `UNSIGNED` or a BOZ constant. If both I and J have `INTEGER` or `UNSIGNED` type, then they shall have the same type and kind type parameter. I and J shall not both be BOZ constants.
  SHIFT | Shall be of type `INTEGER`. It shall be nonnegative. If I is not a BOZ constant, then SHIFT shall be less than or equal to `BIT_SIZE(I)`; otherwise, SHIFT shall be less than or equal to `BIT_SIZE(J)`.

Return value:

  The return value is the same type and type kind parameter as I or, if I is a BOZ constant, J.

Standard:

  Fortran 2008 and later, extension for `UNSIGNED` (see Unsigned integers)

See also:

  `DSHIFTR` — Combined right shift