Click or drag to resize

BitLShift Function (Usual, Usual)

X#
Moves bits in a numeric value to the left by the specified number of positions and returns the resulting value. If the specified expressions are not integers, they are converted to integers before performing the operation.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax
 FUNCTION BitLShift(
	Arg AS USUAL,
	Bits AS USUAL
) AS LONG
Request Example View Source

Parameters

Arg
Type: Usual
Specifies the numeric value in which to move bits to the left.
Bits
Type: Usual

Return Value

Type: Long
Numeric. BitLShift( ) returns the specified expression with bits moved by the specified number of positions.
Remarks
BitLShift( ) does not support Varbinary values.
Examples
X#
1x = 5  // 0101 binary
2y = 1  // Shift bits 1 position left
3? BitLShift(x,y) // Returns 10, 1010 binary
See Also