EasyManua.ls Logo

Radio Shack TRS-80 Model III

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...
!
TRS-80
MODEL
CLEAR n
When used with an argument n (n can be a
constant or an expression)
,
this statement
causes
the
Computer to set aside n bytes for string
storage. In addition all variables
are
set to zero. When the TRS-80
is turned on, 50 bytes are
automatically
set aside for
strings.
The amount
of
string storage CLEARed must
equal or exceed the greatest number of
characters
stored in string
variables during execution; otherwise an Out of String
Space error
will
occur.
Example:
10
CLEAR
1000
Makes 1000 bytes
available for string storage.
By setting string storage to the exact
amount needed, your program can make more
efficient use of memory. A program which uses
no string variables could include
a
CLEAR statement, for example. The CLEAR
argument
must be non-negative, or an
error will result.
T51M. name
(
dim
1
, diml, .
. .,dimK)
Lets you set the
"depth
'
' (number of elements
allowed
per dimension) of an array
or list
of arrays.
If no
DIM
statement is used, a depth of 1
1
(subscripts
0-10)
is
allowed for
each
dimension
of
each array used. To create an array with more than
three dimensions,
you
must
use
DIM.
Example:
10 DIM A(5), B(2,3),
C$(20)
Sets
up
a one-dimension array A with subscripted elements
0-5;
a two-dimension
array B with subscripted elements
0,0
to
2,3;
and a one-dimension
string array C$
with
subscripted
elements
0-20.
Unless previously defined otherwise,
arrays A and
B
will
contain
single-precision values.
DIM statements may be placed anywhere
in your program, and
the depth specifier
may be a number or a numerical expression.
Example:
40 INPUT "NUMBER OF NAMES"; N
50
DIM NA(N,2)
To re-dimension an array, you must first use a CLEAR statement, either with or
without
an
argument. Otherwise an
error
will result.
150

Other manuals for Radio Shack TRS-80 Model III

Related product manuals