Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Logical Operators

Sydrogen currently provides And, Or, and Xor as bitwise operators for integer values.

OperatorOperation
AndBitwise AND
OrBitwise OR
XorBitwise XOR

Precedence is:

And > Or > Xor

Example:

Int A = 12;
Int B = 10;

Int C = A And B;
Int D = A Or B;
Int E = A Xor B;

These operators currently operate on integer operands. They are not yet a general-purpose boolean logic system for non-integer values.


← Previous Next →