DSHIFTR (The GNU Fortran Compiler)

### 8.97 `DSHIFTR` — Combined right shift ¶

Synopsis:

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

Description:

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

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:

  `DSHIFTL` — Combined left shift