%| Operator

Purpose

Performs a logical bit-wise Or of two bit patterns.

Syntax

i %| j

i, j:integer expression

Description

I %| j sets in the result only the bits which are set in both i and j. The %| bitwise operator is equivalent as the 'older' | operator. The %| operator is provided in complement of the new %& bitwise and operator.

Example

Print Bin$(3 %| 2, 4// Prints 0011

Remarks

Or is synonymous with %| and can be used instead:

Print Bin$(3 Or 10, 4// Prints 1011

See Also

And, Or, Xor, Imp, Eqv, %&, ^^, Operator Hierarchy

{Created by Sjouke Hamstra; Last updated: 17/09/2014 by James Gaite}