122-32000 Parallax Inc, 122-32000 Datasheet - Page 258

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
expressions. Increment has two forms, pre-increment and post-increment, depending on
which side of the variable it appears on. The pre-increment form appears to the left of a
variable and the post-increment form appears to the right of a variable. This is extremely
useful in programming since there are many situations that call for the incrementing of a
variable right before or right after the use of that variable’s value. For example:
Y := ++X - 4
The above shows the pre-increment form; it means “increment before providing the value for
the next operation”. It increments the value of
that result to the rest of the expression. If
6 in
statement,
Y := X++ - 4
The above shows the post-increment form; it means “increment after providing the value for
the next operation”.
expression, then increments the value of
as 5 in this example,
evaluated later, then would store 6 in
1, is stored into
Since Increment is always an assignment operator, the rules of Intermediate Assignments (see
page 253) apply here. Assume
Y := ++X + X
Here,
Y := X++ + X
Here,
to 6, then 5 + 6 is evaluated and
Multiply, Return Low ‘
This operator is also called Multiply-Low, or simply Multiply. It can be used in both variable
and constant expressions.
expressions, Multiply Low multiplies two values together and returns the lower 32 bits of the
64-bit result. When used with floating-point constant expressions, Multiply Low multiplies
two values together and returns the 32-bit single-precision floating-point result. Example:
Page 258 · Propeller Manual v1.0
X
, then the expression, 6 - 4 is evaluated, finally writing the result, 2, into
X
X
’s current value, 5, is saved for the next operation (the Add) and
would first be set to 6, then 6 + 6 is evaluated and
X
equals 6 and Y equals 2.
Y
. After this statement,
X++
It provides the current value of
*
would provide the current value for the expression (5 - 4) to be
’, ‘
When used with variable expressions or integer constant
*=
X
Y
started out as 5 for the following examples.
is set to 11.
X
. The expression 5 - 4 is then evaluated and the result,
X
X
equals 6 and Y equals 1.
X
by one and writes that result to
started out as 5 in this example,
X
by one, writes that result to
Y
X
is set to 12.
for the next operation in the
X
itself is incremented
X
. If
++X
X
Y
and provides
X
. After this
would store
started out

Related parts for 122-32000