EasyManua.ls Logo

Laser 128 - Array Variables

Laser 128
255 pages
Print Icon
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...
INTRODUCTION
Integer
variables
are
denoted
by
a
percentage
sign
"
%"
immediately
following
the
variab
le names.
This
type
of
variab
le
can
only
contain
integer
values,
for
exa
mple:
1% =
1234
String
va
riab
les
must
always
end
w
ith
a
dollar
sign
"$".
This
declares
to
the
BASIC
interpreter
that
it
is
dealing
wit
h
string
variables,
and
it
will
allocate
extra
memory
to ha
ndle
it.
For
example:
SENTENCE$
VARIAB
LE!"
"MY
FIRST
STRING
SENTENCE$
is a
valid
string
variable,
but
SENTE
NCE
-
without
the
$
sign
at
the
end -
is not.
1.5
ARRAY
VARIABLES
An
ar
r
ay
is a
matri
x
or
table
of
va
lue
s
that
is
referenced
by
the
same
variable
name
.
The
specific
values
are
accessed by
subscripts
which
ar
e used
in
conjunction
wit
h
the
array's
name.
The
number
of
s
ub
sc
ript
s
for
an
array
is
the
same
as
the
number
of
dimensions
for
it,
and
are
defined
in
the
DIM
statement.
Fo
r
inst
ance:
DIM
ARRAY
(
IO,
IO
, 10)
sets
up
a
thr
ee-
dim
en
sio
nal
array
where
th
e .s
ub
scr
ipt
for
each
dimen
sion ranges
from
0 to
IO
.
Thus
it
is
equ
i
valent
to a
table
containing
I I x I I x
II
or
I33I
entries.
II-5

Table of Contents