ISRL Function

Purpose

Logically shifts the contents of a FIXED BINARY value to the right by the number of bits specified.

Syntax

ISRL(x,y)

Parameters

x and y are expressions that must have a computational type. x is the value that will be shifted to the right. y is a value containing the number of bits to shift the first parameter by.

Description

ISLL returns the value of x, shifted to the right by the number of bits specified in. Zeros will be shifted in to fill the least significant bits of the result. If an argument is not of type FIXED BIN, then it is converted to FIXED BIN.

The result is of type FIXED BIN, with the precision matching that of the first argument.

Examples

Declare x fixed binary(31) initial(1024);

ISRL(x, 1) = 512
ISRL(x, 2) = 256
ISRL(x, 16) = 0
ISRL(x, 24) = 0

Restrictions

None.