BitOr Function (Long, Long) | |
Perform a bitwise inclusive OR operation on two or more values of Numeric, Varbinary, or Blob type and returns the result.
There is a numeric and a binary version of the syntax.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION BitOr(
Arg1 AS LONG,
Arg2 PARAMS LONG[]
) AS LONG
public static int BitOr(
int Arg1,
params int[] Arg2
)
Request Example
View SourceParameters
- Arg1
- Type: Long
Specifies Varbinary or Blob value to perform the bitwise AND operation.
- Arg2
- Type: Long
Specifies Varbinary or Blob values to perform the bitwise AND operation.
Return Value
Type:
LongNumeric or
Varbinary.
BitOr( ) returns the result of a bitwise inclusive OR operation on the specified expressions.
For
Varbinary or
Blob values, the return value is calculated as if all values are padded with 0h00 on the right of the value
up to the length of the longest value. The appropriate operation is then performed between those values.
Remarks BitOr( ) compares each bit in eExpressionN to the corresponding bit in eExpressionN+1. If either of the bits in eExpressionN and eExpressionN+1 is 1,
the corresponding result bit is set to 1; otherwise, the corresponding result bit is set to 0.
The following table shows the result of an inclusive OR operation on corresponding eExpressionN and nExpressionN+1 bits:
eExpressionN bit | eExpressionN+1 bit | Resulting bit |
---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Examples 1x = 5
2y = 6
3? BitOr(x,y)
See Also