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

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
Quick Review: Ex 7
Objects:
Spin language:
The Propeller Tool bolds matching parentheses pairs surrounding the cursor.
o Have no direct relationship with cogs.
o Should call interface methods “Start” and “Stop” if they affect other cogs.
o Should call interface method “Init” if it needs initialization.
o Variables defined in variable blocks are global to the object so modifications
o Booleans: (See Constants (pre-defined), page 202 and Operators, page 249).
o Compound expressions can include Intermediate Assignments, see page 253.
o Operators:
o Methods: (See
o
o
o
o
by one method are visible by other methods. See
COGNEW
COGSTOP
IF
following it if the conditional statement is true, see
REPEAT
least once and continue while Condition is true. See
is a conditional structure that executes the indented block of code
’s conditional, one-to-many form:
returns the ID (0 to 7) of cog started; -1 if none, see
FALSE
TRUE
“Pre”/“Post” operators perform their duty before/after the variable’s
value is used by the expression.
Assignment ‘
Variable Assignment ‘
Post-Clear ‘
Extend 7 or Post-Clear ‘
Pre-Decrement ‘
expression the result, see Decrement, pre- or post- ‘- -’, page 257.
Is Greater Than ‘
that of right-side, see Boolean Is Greater Than ‘>’, ‘>=’, page 276.
Limit Minimum ‘
or its right, see Limit Minimum ‘#>’, ‘#>=’, page 260.
Always return a long value (4 bytes) whether or not one is specified.
Contain a built-in local variable,
Return values are declared by following the method’s name and
parameters with a colon (
deactivates a cog by ID, see
= -1; any non-zero (≠0) value is True for Boolean comparisons.
= 0
PUB
, page 287).
~
’ clears the variable preceding it to zero (0), see Sign-
:=
’ is similar to equal ‘
--
>
#>
’ returns True if value on left-side is greater than
’ decrements the variable following it, giving the
’ returns the greater of either the value on its left
:=
~
’, page 255.
:
’, page 262.
) and a descriptive return value name.
COGSTOP
RESULT
REPEAT WHILE
, page 193.
Propeller Manual v1.0 · Page 123
, that holds its return value.
=
VAR
’ in other languages, see
IF
REPEAT
, page 315.
, page 220.
Condition executes at
COGNEW
, page 293.
, page 189.

Related parts for 122-32000