BitNot
Not available in this language yet.
BitNot( value )
BitNot( value )
BitNot( value )
Not available in this language yet.
BitNot( value )
Description
The BitNot
function returns the
Two’s Complement of a
number. The argument must be a number, and fractional values are
truncated before the operation is applied.
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
Number |
A single value to take the two’s complement. |
Examples
The query below executes an array of independent bitwise NOT 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(
BitNot(Value(0)),
BitNot(Value(1)),
BitNot(Value(7))
)
).get());
[-1, -2, -8]
client.query([
q.BitNot(0),
q.BitNot(1),
q.BitNot(7),
])
.then((ret) => console.log(ret))
[ -1, -2, -8 ]
Not available in this language yet.
println(Await.result(
client.query(
Arr(
BitNot(0),
BitNot(1),
BitNot(7)
)
),
5.seconds
))
[-1, -2, -8]
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!