ISRL
ISRL(x,n) returns the result of logically shifting x to the right by n places, and padding on the left with zeroes.
- x
- Expression. x must have a computational type.
- n
- Expression. n must have a computational type.
The attributes of the result are determined as follows:
- If x is REAL FIXED BIN(p,0) and SIGNED, the result is SIGNED REAL FIXED BIN(p,0).
- If x is REAL FIXED BIN(p,0) and UNSIGNED, the result is UNSIGNED REAL FIXED BIN(p,0).
- Otherwise, x is converted to SIGNED REAL FIXED BIN(p,0) and the result has the same attributes.
The result is undefined if n is negative or if n is greater than M.
If x is nonnegative, ISRL(x,n) is equivalent to LOWER2(x,n); if x is negative, ISRL(x,n) is positive, unless n=0.
Examples
isrl(+6,1) /* produces 3 */
isrl(-6,1) /* produces 2147483645 */