SHR= Operator

Does a right-shift on the bits of a variable and assigns the result to the same variable.

Syntax

variable SHR= number

Parts

variable
A numeric variable.
number
An integer expression that specifies the number of bits to shift.

Instructions

The two statements that follow are equivalent.

variable SHR= number
variable = variable SHR number

Examples

a = &B1010_1000
b = a
a SHR= 2
b SHR= 4
After execution
VariableValue
a&B0010_1010 (42)
b&B0000_1010 (6)

See also