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

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
Byte Variable Declaration (Syntax 1)
In
byte-sized, or are any array of bytes.
For example:
VAR
The above example declares two variables (symbols),
byte-sized variable. The line under the
create an array of 25 byte-sized variable elements called
accessed from any
they are global to the object. An example of this is below.
PUB SomeMethod
For more information about using
Declarations (Syntax 1) on page 315, and keep in mind that
that description.
Byte Data Declaration (Syntax 2)
In
compiled as constant values in main memory.
optional symbol preceding it, which can be used for later reference (See
example:
DAT
The above example declares two data symbols,
points to the start of byte-aligned and byte-sized data in main memory.
main memory, are 64, $AA and 55, respectively.
“H”, “e”, “l”, “l”, “o”, and 0, respectively. This data is compiled into the object and resulting
application as part of the executable code section and may be accessed using the read/write
Page 166 · Propeller Manual v1.0
byte Temp
byte Str[25]
Temp := 250
Str[0] := "A"
Str[1] := "B"
Str[24] := "C"
MyData
MyString
DAT
VAR
blocks, syntax 2 of
blocks, syntax 1 of
– Spin Language Reference
byte 64, $AA, 55
byte "Hello",0
PUB
or
PRI
BYTE
BYTE
method within the same object that this
is used to declare byte-aligned, and/or byte-sized data that is
is used to declare global, symbolic variables that are either
BYTE
'Temp is a byte
'Str is a byte array
'Set Temp to 250
'Set first element of Str to "A"
'Set second element of Str to "B"
'Set last element of Str to "C"
Temp
in this way, refer to the
declaration uses the optional Count field to
DAT
'Byte-aligned and byte-sized data
'A string of bytes (characters)
MyData
MyString
blocks allow this declaration to have an
Temp
and
and
Str
BYTE
’s values, in main memory, are
MyString
. Both
Str
is used for the Size field in
.
VAR
Temp
VAR
Temp
. Each data symbol
DAT
block was declared;
MyData
section’s Variable
is simply a single,
, page 208). For
and
’s values, in
Str
can be

Related parts for 122-32000