Partager via


BITRSHIFT( ) Function

Moves bits in a numeric value to the right by the specified number of positions and returns the resulting value.

Note

If the specified expressions are not integers, they are converted to integers before performing the operation.

BITRSHIFT(nExpression1, nExpression2)

Parameters

  • nExpression1
    Specifies the numeric value in which to move bits to the right.

  • nExpression2
    Specifies the number of bit positions to move to the right.

Return Value

Numeric. BITRSHIFT( ) returns the specified expression with bits moved by the specified number of positions.

Remarks

BITRSHIFT( ) does not support Varbinary values.

Example

x = 5  && 0101 binary
y = 1  && Shift bits 1 position right

? BITRSHIFT(x,y) && Returns 2, 0010 binary

See Also

Reference

BITAND( ) Function

BITCLEAR( ) Function

BITLSHIFT( ) Function

BITNOT( ) Function

BITOR( ) Function

BITSET( ) Function

BITTEST( ) Function

BITXOR( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)