Sharp PC-1403 Operation Manual page 89

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

83
For
example,
if DIM
Z$ (2,3}*10
is
specified, 12 variabl
e
s,
each
capable
of
storing 1 O
characters,
are
reserved.
This
requires
7
bytes
(variable name)
+
10
bytes (number of characters)
x
12
=
127
bytes.
Variable
Variable
name
Data
Numeric variable
7 bytes
8
bytes
Array variable
Specified
number
String variable
7
bytes
Simple variable
(two-character
16
bytes
variable)
Note:
Two-dimensional
arrays
can rapidly eat up
storage
space.
For example, an
array with
25
rows and
35
columns
uses
875 storage locations!
Arrays are very
powerful
programming
tools.
The following table
shows
the
number
of
bytes used to defi
n e each variable and
the
number used
by
each
program statement.
Row2
Rowl
I
T
(0.
0)
T
(0,
1)
I
T
(0,
2)
TIO,
3)
I
I
T
(1.
0)
T
(1,
1)
T (1,
2)
T (1,
3)
T
(2,0)
T
(2, 1)
T
(2, 2)
T (2, 3)
RowO
Column4
Column3
Column2
Columnl
DIM character-variable-name
(rows,
columns)*length
where:
rows
specifies the number
of rows in the
array.
This must
be
a
number in the range O
through
255.
Note
that
when you specify the
number
of rows
you
get
one
more
row
than the
specification.
columns
specifies
the
number
of
columns
in the
array.
This must
be
a number
in
the
range O through
255.
Note
that
when
you specify the number
of
columns
you
get
one more column
than
the
specification.
The
following
diagram illustrates the storage locations
that
result
from
the
declaration
DIM T
(2,
3) and the
subscripts (now composed
of
two numbers} that pertain to each
storage
location:
or
DIM numeric-variable-name
(rows,
columns}
Concepts and Terms of BASIC

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents