RSHIFT(I, SHIFT) (IBM extension)

Purpose

Performs an arithmetic shift to the right.

Class

Elemental function

Argument type and attributes

I
must be of type integer.
SHIFT
must be of type integer. It must be non-negative and less than or equal to BIT_SIZE(I).

Result type and attributes

Same as I.

Result value

Examples

RSHIFT (3, 1) has the result 1.

RSHIFT (3, 2) has the result 0.

RSHIFT (-1, 32) has the result -1.

Specific Name Argument Type Result Type Pass As Arg?
RSHIFT any integer same as argument yes