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

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
be our
numerical value 0 and
non-zero value (≠0) as
COGNEW
started while 1 to 8 (
So, in that single line of code we launched a new cog (hopefully), passed it the reference to
the
variable
line demonstrates one of the most powerful features of the Spin language: compound
expressions with assignable intermediate results.
The outer parentheses encasing the
separate the two different variable assignments;
assigned to
Propeller Tool temporarily bolds the matching pairs of parentheses that surround the current
cursor position. Place the cursor in various positions on the line to see the effect. The figure
below illustrates this; the star shows the cursor position, arrows show the bolded parentheses,
and the shaded area is what is contained within those parentheses.
Page 120 · Propeller Manual v1.0
Matching parentheses are temporarily displayed in bold for the expression group
the cursor is currently within. Use this feature to study complex expressions.
Toggle
’s return value; the range -1 to 7 becomes 0 to 8, and 0 (
Start
Cog
routine and stack space to use, stored the newly activated cog ID plus 1 in the
Success
and used that final result to set
method’s Boolean return value? A Boolean result of
. To assist you in studying complex expressions such as this one, the
TRUE
TRUE
Figure 3-15: Matching Parentheses Bolded
) means a cog was started.
TRUE
is -1, but Boolean comparisons treat zero (0) as
. This is very convenient and is the reason we added 1 to
Cog :=
… part are not required but we added them to help
Start
’s return value, the
Cog
is assigned first then that result is
FALSE
Success
FALSE
) means no cog was
is actually the
variable! This
FALSE
and any

Related parts for 122-32000