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

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
PUB SomeMethod
Notice that
GetString
preceding it. This is because our fictitious
variable. If we had said
been passed to
Str
elements. Lastly, we use
equal to the character
Variable Declarations (Syntax 2)
A variation on Syntax 1 allows for comma delimited variables of the same size. The
following is, similar to the above example, but we declare two words,
VAR
Scope of Variables
Symbolic variables defined in Variable Blocks are global to the object in which they are
defined but not outside of that object. This means that these variables can be accessed
directly from anywhere within the object but their name will not conflict with symbols
defined in other parent or child objects.
Public and Private methods have the ability to declare their own local variables. See
page 287, and
Global variables are not accessible outside of an object unless the address of that variable is
passed into, or back to, another object through a method call.
Page 316 · Propeller Manual v1.0
Code := 60000
LargeNumber := Code * 250
GetString(@Str)
if Str[0] == "A"
byte Str[10]
word Code, Index
long LargeNumber
to be passed to
<more code here>
– Spin Language Reference
method’s parameter list looks different; it has an
Code
PRI
GetString
and
, page 286.
LargeNumber
"A"
GetString
. By using the Symbol Address operator,
. Remember, the first element of an array is always zero (0).
GetString(Str)
Str[0]
instead;
in the condition of an
are used directly by expressions. The
, then the first byte of
GetString
GetString
can use that address to write to
method needs to write back to the
IF
statement to see if the first byte is
@
, the Symbol Address operator,
Str
@
, we caused the address of
, element 0, would have
Code
Str
and
reference in the
Index
.
Str
PUB
Str
’s
,

Related parts for 122-32000