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.
Not available in this language yet.
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

value

List of Numbers

A single value or a list of values to bitwise OR.

Returns

A number which is the bitwise OR of all values.

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.

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
]