ISHFTC (The GNU Fortran Compiler)

### 8.167 `ISHFTC` — Shift bits circularly ¶

Synopsis:

  `RESULT = ISHFTC(I, SHIFT [, SIZE])`

Description:

  `ISHFTC` returns a value corresponding to I with the rightmost SIZE bits shifted circularly SHIFT places; that is, bits shifted out one end are shifted into the opposite end. 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. The absolute value of SHIFT must be less than SIZE. If the SIZE argument is omitted, it is taken to be equivalent to `BIT_SIZE(I)`.

Class:

  Elemental function

Arguments:

  I | The type shall be `INTEGER` or `UNSIGNED`.
  SHIFT | The type shall be `INTEGER`.
  SIZE | (Optional) The type shall be `INTEGER`; the value must be greater than zero and less than or equal to `BIT_SIZE(I)`.

Return value:

  The return value is of the same type as I.

Specific names:

  Name | Argument | Return type | Standard
  --- | --- | --- | ---
  `ISHFTC(A)` | `INTEGER A` | `INTEGER` | Fortran 90 and later
  `BSHFTC(A)` | `INTEGER(1) A` | `INTEGER(1)` | GNU extension
  `IISHFTC(A)` | `INTEGER(2) A` | `INTEGER(2)` | GNU extension
  `JISHFTC(A)` | `INTEGER(4) A` | `INTEGER(4)` | GNU extension
  `KISHFTC(A)` | `INTEGER(8) A` | `INTEGER(8)` | GNU extension

Standard:

  Fortran 90 and later, has overloads that are GNU extensions. Extension for `UNSIGNED` (see Unsigned integers)

See also:

  `ISHFT` — Shift bits