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

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
CON
Declare a Constant Block.
CON
CON
CON
Explanation
The Constant Block is a section of source code that declares global constant symbols and
global Propeller configuration settings. This is one of six special declarations (
PUB
Constants are numerical values that can not change during run time. They can be defined in
terms of single values (1, $F, 65000, %1010, %%2310, “A”, etc.) or as expressions, called
constant expressions, (25 + 16 / 2, 1000 * 5, etc.) that always resolve to a specific number.
The Constant Block is an area of code specifically used for assigning symbols (useful names)
to constants so that the symbols can be used anywhere in code where that constant value is
needed. This makes code more readable and easier to maintain should you later have to
change the value of a constant that appears in many places. These constants are global to the
object so that any method within it can use them. There are many ways to define constants,
described below.
Common Constant Declarations (Syntax 1)
The most common forms of constant declarations begin with
by one or more declarations.
on and we recommend the lines following be indented by at least one space. The expressions
can be combinations of numbers, operators, parentheses, and single quoted characters. See
Operators, page 249, for examples of expressions.
Page 194 · Propeller Manual v1.0
Symbol = Expression
#Expression (( ,┆
Symbol
,
PRI
– Spin Language Reference
, and
Symbol
Expression
Expression can include other constant symbols as long as they were defined
previously.
(( ,┆
DAT
is the desired name for the constant.
) that provide inherent structure to the Spin language.
)) Symbol
is any valid integer, or floating-point, constant algebraic expression.
)) Symbol
(( ,┆
CON
)) Symbol = Expression
(( ,┆
must start in column 1 (the leftmost column) of the line it is
)) Symbol
CON
on a line by itself followed
CON
,
VAR
,
OBJ
,

Related parts for 122-32000