DSHIFTR intrinsic function

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

DSHIFTR ( I, J, SHIFT )

I : BOZ literal constant or Integer;
J : BOZ literal constant or Integer (same kind as I if I is Integer);
SHIFT : Integer, conformable with I;

Result : Integer, same kind as I (or J).

Note: At least one of I and J must be of type Integer.

<Semantics>

The value of the result is obtained by shifting J to the right SHIFT times, with the bits shifted in on the left coming from the least significant bits of I. It is required that 0≤SHIFT≤BIT_SIZE(I). This is equivalent to the expression IOR(SHIFTL(I,BIT_SIZE(I)-SHIFT),SHIFTR(J,SHIFT).

This is an elemental function; if any argument is an array the result is an array of the same shape, with the DSHIFTR operation being applied elementwise.

<Related>

DSHIFTL intrinsic function, IAND intrinsic function, IEOR intrinsic function, IOR intrinsic function, LEADZ intrinsic function, MASKL intrinsic function, MASKR intrinsic function, NOT intrinsic function, POPCNT intrinsic function, POPPAR intrinsic function, SHIFTA intrinsic function, SHIFTL intrinsic function, SHIFTR intrinsic function, TRAILZ intrinsic function