Shift Right

SWF Action
Action Category: 
Arithmetic
Action Details: 
0
Action Identifier: 
100
Action Structure: 
<n.a.>
Action Length: 
0 byte(s)
Action Stack: 
pop 2 (i), push 1 (i)
Action Operation: 
i1 := pop();
i2 := pop();
r := i2 >> i1;
push(r);
Action Flash Version: 
5

Pop two integers, shift the 2nd signed integer by the number of bits specified by the first integer and push the result back on the stack.

To right shift an unsigned integer, use Shift Right Unsigned instead.

This action repeats the sign bit of the integer being shifted. This means negative numbers remain negative and positive numbers remain positive.