EasyManua.ls Logo

Radio Shack TRS-80 Model III - Special Features

Radio Shack TRS-80 Model III
274 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BASIC
All we do is increase the size
(or
"
depth
'
'
) of each
dimension as
needed
.
Let
'
s
assume our checkbook
includes check
numbers 00 1
through
300,
and we want to
store the entire checkbook
record. Just make
these
changes:
40 DIM CK(300ยป3>
'SET UP A 300 BY 3
ARRAY
50 FOR ROW
=
1 TO
300
and add DATA
lines for check
numbers 00 1
through
300
.
You
'
d
probably want to
pack
more data onto each DATA
line than
we did in the
above DATA
lines.
And you'd
change all the
ROW counter final
values:
150
FOR ROW
=
1
TO 300
240 FOR ROW
=
1
TO 300
Other Types of Arrays
Remember, in Model III BASIC the
number of
dimensions an
array can
have (and
the size
or depth of the array)
,
is limited
only
by
the
amount of
memory
available
.
Also
remember that
string
arrays can
be
used. For
example,
CS(X)
would
automatically
be interpreted as a
string
array. And
if
you
use DEFSTR A at
the beginning of your
program, any array whose name begins
with
A
would also be a
string array. One
obvious application for a string array would be
to store text
material for
access by a
string manipulation program.
10 CLEAR
1200
20 DIM TXT*(
10)
would
set
up
a
string array capable of storing 10
lines of text. 1200
bytes were
CLEARed to
allow for
10
sixty-character lines, plus 600
extra bytes for
string
manipulation
with other string variables.
175

Other manuals for Radio Shack TRS-80 Model III

Related product manuals