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

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
FILE
Import external file as data.
DAT
Explanation
The
block of an object. The data can then be accessed by the object just like any regular
block data.
Using FILE
FILE
filename in quotes instead of data values. For example:
DAT
In this example, the
called Datafile.dat. Upon compile, the Propeller Tool will search through the editor tabs, the
working directory or the library directory for a file called Datafile.dat and will load its data
into the first byte following the zero-terminated string,
data using the
PUB GetData | Index, Temp
This example will read the imported data, one byte at a time, until it finds a byte equal to 0.
FILE
Str
Data
Index := 0
repeat
while Temp > 0
FILE
is used in
Temp := byte[Data][Index++] 'Read data into Temp 1 byte at a time
<do something with Temp>
FileName
with this name is searched for in the editor tabs, the working directory and the library
directory. FileName can contain any valid filename characters; disallowed characters
are \, /, :, *, ?, ", <, >, and |.
"FileName"
directive is used to import an external data file (usually a binary file) into the
byte "This is a data string.", 0
file "Datafile.dat"
BYTE
DAT
is the name, without extension, of the desired data file. Upon compile, a file
,
WORD
blocks similar to how
DAT
or
block is made up of a byte string followed by the data from a file
LONG
declarations as they would normal data. For example:
BYTE
'Perform task with value in Temp
'Loop until end found
4: Spin Language Reference –
would be used, except that following it is a
Str
. Methods can access the imported
Propeller Manual v1.0 · Page 215
DAT
DAT

Related parts for 122-32000