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

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
Declare in-line constant expression to be completely resolved at compile time.
((PUB ┆ PRI))
Returns: Resolved value of constant expression.
Explanation
The
multiple places in code, but there are occasions when a constant expression is needed for
temporary, one-time purposes. The
line, constant expression at compile time. Without the use of the
method’s in-line expressions are always resolved at run time, even if the expression is always
a constant value.
Using CONSTANT
The
speed up run-time execution. Note the two examples below:
Example 1, using standard run-time expressions:
CON
PUB Blink
Example 2, same as above, but with
expressions:
Page 200 · Propeller Manual v1.0
CONSTANT
X = 500
Y = 2500
!outa[0]
waitcnt(X+200 + cnt)
!outa[0]
waitcnt((X+Y)/2 + cnt)
CONSTANT
CON
ConstantExpression
block may be used to create constants from expressions that are referenced from
(ConstantExpression )
directive can create one-time-use constant expressions that save code space and
– Spin Language Reference
is the desired constant expression.
CONSTANT
CONSTANT
directive is used to fully resolve a method’s in-
'Standard run-time expression
'Standard run-time expression
directive around constant, run-time
CONSTANT
directive, a

Related parts for 122-32000