Scalar FunctionsMath Functions
binary_shift_right
Shift a 64-bit integer right by a number of bits.
The shift is
arithmetic: the sign bit fills in from the left, so a negative value
stays negative. The shift count is taken modulo 64; a negative count
returns null.
The result is a long; a null argument gives null.
Aliases: shift_right
Syntax
binary_shift_right(value, shift)Parameters
Prop
Type
Returns: long
Examples
Example 1
print binary_shift_right(16, 2), binary_shift_right(-16, 2)| print_0 (long) | print_1 (long) |
|---|---|
| 4 | -4 |