DATA:Shift:Right

DATA:Shift:Right

Shifts bits to the right

DATA:Shift:Right

Defined In: DATA.NLM

Service: NetBasic


Syntax

<iResult> = DATA:Shift:Right (<iValue>, <iNumPosRight>)


Return Values

Integer


Remarks

Shifts bits in <iValue> to the right <iNumPosRight> number of positions and sets the shifted leftmost bits to zero. <iResult> is the result of <iValue> shifted right <iNumPosRight> times.


See Also

DATA:And, DATA:Or, DATA:Shift:Bits, DATA:Shift:Left


Example

Result = DATA:Shift:Right (9, 3)
Print (Result) ' Result = 1
Newline
Result = DATA:Shift:Right (26, 2)
Print (Result) ' Result = 6
Newline