BitOr
Not available in this language yet.
BitOr( value_1, value_2, ... )
BitOr( value_1, value_2, ... )
BitOr( value_1, value_2, ... )
Not available in this language yet.
BitOr( value_1, value_2, ... )
Description
The BitOr
function returns the bit to the result if the bit exists in
any argument. The arguments must be numbers, and the fractional portion
is truncated before the or operation is applied. The result is the
bitwise OR of all the arguments.
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
List of Numbers |
A single value or a list of values to bitwise OR. |
Examples
The query below executes an array of independent bitwise OR operations and returns results in the result array. The result array position matches the position in the execution array.
Not available in this language yet.
Not available in this language yet.
System.out.println(
client.query(
Arr(
BitOr(Value(0), Value(0)),
BitOr(Value(1), Value(0)),
BitOr(Value(1), Value(1)),
BitOr(Value(6), Value(3))
)
).get());
[0, 1, 1, 7]
client.query([
q.BitOr(0, 0),
q.BitOr(1, 0),
q.BitOr(1, 1),
q.BitOr(6, 3),
])
.then((ret) => console.log(ret))
[ 0, 1, 1, 7 ]
Not available in this language yet.
println(Await.result(
client.query(
Arr(
BitOr(0, 0),
BitOr(1, 0),
BitOr(1, 1),
BitOr(6, 3)
)
),
5.seconds
))
[0, 1, 1, 7]
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!