Data Sheet

MicroBasic Scripting
208 Advanced Digital Motor Controller User Manual V1.8, August 28, 2017
The first form is a prefix increment operation. The result of the operation is the value of
the operand after it has been incremented.
The second form is a postfix increment operation. The result of the operation is the value
of the operand before it has been incremented.
a = 10
Print(a++, “\n”)
Print(a, “\n”)
Print(++a, “\n”)
Print(a, “\n”)
The output of previous program will be the following:
10
11
12
12
-- Operator
The decrement operator (--) decrements its operand by 1. The decrement operator can ap-
pear before or after its operand:
-- var
var --
The first form is a prefix decrement operation. The result of the operation is the value of
the operand after it has been decremented.
The second form is a postfix decrement operation. The result of the operation is the value
of the operand before it has been decremented.
a = 10
Print(a--, “\n”)
Print(a, “\n”)
Print(--a, “\n”)
Print(a, “\n”)
The output of previous program will be the following:
10
9
8
8
<< Operator
The left-shift operator (<<) shifts its first operand left by the number of bits specified by its
second operand.
expression << expression
The high-order bits of left operand are discarded and the low-order empty bits are ze-
ro-filled. Shift operations never cause overflows.