# DSHIFTL

Elemental Intrinsic Function (Specific): Selects the left 64 bits after shifting a 128-bit integer value to the left. This function cannot be passed as an actual argument.

result = DSHIFTL (i,j,shift)

i | (Input) Must be of type integer, or a binary, octal, or hexadecimal literal constant.
j | (Input) Must be of type integer, or a binary, octal, or hexadecimal literal constant. If both i and j are of type integer, they must have the same kind type parameter. i and j must not both be binary, octal, or hexadecimal literal constants.
shift | (Input) Integer. Must be nonnegative and less than or equal to 64. This is the shift count.

## Results

The result type is integer. The result value is the 64-bit value starting at bit 128 - shift of the 128-bit concatenation of the values of i and j.

If either i or j is a binary, octal, or hexadecimal 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 the same as the leftmost bits of i, and the remaining bits of the result value are the same as the rightmost bits of j. This is equal to IOR (SHIFTL (I, SHIFT), SHIFTR (J, BIT SIZE (J) - SHIFT)).

## Example

Consider the following:

    INTEGER(8) ILEFT / Z'111122221111222' /
    INTEGER(8) IRIGHT / Z'FFFFFFFFFFFFF' /
    PRINT *, DSHIFTL (ILEFT, IRIGHT, 16_8)  ! prints 1306643199093243919

Parent topic: C to D

## See Also

Binary, Octal, Hexadecimal, and Hollerith Constants
Model for Bit Data