Purpose
Performs a combined shift to the
left.
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 rightmost SHIFT bits of the result value
are equal to the leftmost SHIFT bits of J, and other bits of the result
value are equal to the rightmost bits of I, which is equal to IOR
(SHIFTL (I, SHIFT), SHIFTR (J, BIT SIZE (J)-SHIFT)).
- No vacated bits.
- The bits are numbered 0 to BIT_SIZE(I)-1, from right to left.
Example
DSHIFTL (5,
2**15, 10) has the result 5120.