SHIFTR

Elemental Intrinsic Function (Specific): Logically shifts an integer right by a specified number of bits.

Syntax

result = SHIFTR (ivalue, ishift)

ivalue
(Input) INTEGER(4). This is the value to be shifted.


ishift
(Input) INTEGER(4). The value must be positive. This value is the number of positions to shift.

Results

The result type is INTEGER(4). The result is the value of ivalue shifted right by ishift  bit positions. Bits shifted off the right end are lost; zeros are shifted in from the opposite end.

SHIFTR (i, j) is the same as ISHA (i, -j).

See Also

ISHA