Skip to main content

bitwise-or (|)

Use | to compute the bitwise OR operation between the first integer oper1 value and the second integer oper2 value.

Basic syntax​

To compute the bitwise OR operation between the oper1 and oper2 integer values, use the following syntax:

(| oper1 oper2)

Arguments​

Use the following arguments to specify the integers for the bitwise OR operation using the | Pact function.

ArgumentTypeDescription
oper1integerSpecifies the first integer for the OR operation.
oper2integerSpecifies the second integer for the OR operation.

Return value​

The | function returns the result of the bitwise OR operation as an integer.

Examples​

The following examples demonstrate how to use the | function to perform bitwise OR manipulation between two integers in a Pact REPL:

pact> (| 2 3)
3

pact> (| 5 -7)
-3