Home News DOC Class DL Others Cooker
Documents  >  Tutorial  >  Priority 8
Priority 8 operators

It describes the following operators with priority 8.


&x & yLogical AND operator

It is binary logical AND operator.


Table of contents:


Logical AND operator

Logical AND operator

Logical AND operator is an operator for performing logical AND operation on the left and right operands. The operand must be the bool class.

The class of the result is a bool class.


bool result = true & true; // The result is true;

result = true & false; // The result is false;

result = false & true; // The result is false;

result = false & false; // The result is false;

Operand evaluation is not short-circuit evaluation. The both operands are always evaluated.


If operands return the proxy class, the entity of the proxy is automatically used. The result is the same as calling the Entity getter of the proxy class.


bool b = true;

bool b2 = false;

proxy pro = new proxy(b);

proxy pro2 = new proxy(b2);

bool b3 = pro2 & pro; // b3 is false.

Next
Previous
Copyright © Rice All rights reserved.