BitSet Function (Usual, Usual) | |
Sets a bit to 1 in a value of Numeric, Varbinary, or Blob type and returns the resulting value.
There is a numeric and a binary version of the syntax.
If the specified expression is not an integer, it is converted to an integer before setting the bit.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION BitSet(
Arg1 AS USUAL,
Bit AS USUAL
) AS USUAL
public static Usual BitSet(
Usual Arg1,
Usual Bit
)
Request Example
View SourceParameters
- Arg1
- Type: Usual
Specifies a Numeric or a Varbinary value to set the bit.
- Bit
- Type: Usual
Specifies the position of the bit in nExpression1 to set to 1. nExpression2 can range from 0 to 31 with 0 as the bit farthest to the right.
Return Value
Type:
UsualNumeric,
Varbinary, or
Blob.
BitSet( ) returns the specified expression with the specified bit set to 1.
Examples 1x = 5
2y = 1
3? BitSet(x,y)
See Also