beautypg.com

2 equality operators, 6 maxl bitwise operators, 1 bitwise and operator – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 82

background image

5.4.1.4.5.2 Equality Operators

The binary equality operators compare their operands for strict equality or inequality.

Syntax

equality-expression :

expression == expression
expression != expression

expression:

equality-expression

The equality operators, equal to (==) and not equal to (!=), have lower precedence
than the relational operators, but they behave similarly.

The equal-to operator (==) returns 1 if both operands have the same value; otherwise,
it returns 0. The not-equal-to operator (!=) returns 1 if the operands do not have the
same value; otherwise, it returns 0.

Equality operators can compare pointers to members of the same type.

5.4.1.4.6 MAXL Bitwise Operators

The bitwise operators are:

• Bitwise AND (&)

Bitwise exclusive OR (^)

Bitwise inclusive OR (|)

These operators return bitwise combinations of their operands

5.4.1.4.6.1 Bitwise AND Operator

The bitwise AND operator (&) returns the bitwise AND of the two operands. All bits
that are on (1) in both the left and right operand are on in the result; bits that are off
(0) in either the left or the right operand are off in the result.

Syntax

and-expression :

expression & expression

expression:

and-expression

Both operands to the bitwise AND operator must be integer types.

Maestro

Software Manual

MAXL Program Language

MAN-MASSW (Ver. Q)

5-20