Data Sheet
MicroBasic Language Reference
Advanced Digital Motor Controller User Manual 207
Mod Operator
The modulus operator (Mod) computes the remainder after dividing its first operand by its
second.
expression Mod expression
And Operator
The (And) operator functions only as a binary operator. For numbers, it computes the
bitwise AND of its operands. For boolean operands, it computes the logical AND for its
operands; that is the result is true if and only if both operands are true.
expression And expression
Or Operator
The (Or) operator functions only as a binary operator. For numbers, it computes the bit-
wise OR of its operands. For boolean operands, it computes the logical OR for its oper-
ands; that is, the result is false if and only if both its operands are false.
expression Or expression
XOr Operator
The (XOr) operator functions only as a binary operator. For numbers, it computes the
bitwise exclusive-OR of its operands. For boolean operands, it computes the logical exclu-
sive-OR for its operands; that is, the result is true if and only if exactly one of its operands
is true.
expression XOr expression
Not Operator
The (Not) operator functions only as a unary operator. For numbers, it performs a bitwise
complement operation on its operand. For boolean operands, it negates its operand; that
is, the result is true if and only if its operand is false.
Not expression
True Literal
The True keyword is a literal of type Boolean representing the boolean value true.
False Literal
The False keyword is a literal of type Boolean representing the boolean value false.
++ Operator
The increment operator (++) increments its operand by 1. The increment operator can ap-
pear before or after its operand:
++ var
var ++