Purpose
Performs a combined shift to the
right.
Argument type and attributes
- I
- An INTENT(IN) INTEGER or boz-literal CONSTANT
- J
- An INTENT(IN) INTEGER or boz-literal CONSTANT
If
both I and J are of type INTEGER, they must be the
same kind. I and J must not both be boz-literal CONSTANT.
- SHIFT
- An INTENT(IN) INTEGER. Its
value must be non-negative, and less than or equal to BIT_SIZE(I)
when I is an INTEGER. Otherwise, it must be less
than or equal to BIT_SIZE(J).
Result type and attributes
Same as I when
I is of type integer. Otherwise, same as J.
Result value
- If I or J is a boz-literal constant, it is first converted as
if by the intrinsic function INT to type integer with the kind type
parameter of the other. The leftmost SHIFT bits of the result value
are equal to the rightmost SHIFT bits of I, and other bits of the
result value are equal to the leftmost bits of J, which is equal to
IOR (SHIFTL (I, BIT SIZE (I)-SHIFT), SHIFTR (J, SHIFT)).
- No vacated bits.
- The bits are numbered 0 to BIT_SIZE(I)-1, from right to left.
Example
DSHIFTR (-50,
-128, 30) has the result -197.