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

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
Constant Assignment ‘
The Constant Assignment operator is used within
constants. For example,
CON
This code sets the symbol _
Throughout the rest of the program the compiler will use these numbers in place of their
respective symbols. See
These declarations are constant expressions, so many of the normal operators can be used to
calculate a final constant value at compile time. For example, it may be clearer to rewrite the
above example as follows:
CON
Here,
readers that the
sequence for that particular application.
The above examples create 32-bit signed integer constants; however, it is also possible to
create 32-bit floating-point constants. To do so, the expression must be expressed as a
floating-point value in one of three ways: 1) as an integer value followed by a decimal point
and at least one digit, 2) as an integer with an E followed by an exponent value, or 3) both 1
and 2 For example:
CON
The above code creates three floating-point constants.
to 0.4 and
/ 5.0, the expression would be treated as an integer constant and the result would be an integer
constant equal to 0.
Page 254 · Propeller Manual v1.0
_xinfreq = 4096000
WakeUp
_xinfreq
Reset
Initialize = %00010000
WakeUp
OneHalf = 0.5
Ratio
Miles
WakeUp
Miles
= 2.0 / 5.0
= 10e5
is still set to %00110000 at compile time, but it is now more obvious to future
= %00110000
is equal to 1,000,000. Note that if
WakeUp
= 4096000
= %00100000
= Reset & Initialize
CON
symbol contains the binary codes for a
For floating-point constant expressions, every value within the
=
, page 194.
xinfreq
to 4,096,000 and the symbol
Ratio
OneHalf
CON
were defined as 2 / 5 instead of 2.0
blocks to declare compile-time
is equal to 0.5,
Reset
WakeUp
and an
to %00110000.
Ratio
Initialize
is equal

Related parts for 122-32000