EasyManua.ls Logo

Apple IIe - Page 96

Apple IIe
320 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...
96
Apple
lie
Users
Handbook
Integer
DIM
a (i[,b(i) .
..
]
a$
(i[
,b$(i) ... ]
a
and
bare
the
variables
to
be
dimensioned.
i
and
j
are
integers.
In
Integer
BASIC,
the
string
variable
must
be
dimensioned
with
255
elements
or
less.
In
Applesoft
BASIC, all
arrays,
strings,
and
matrices
are
prede-
fined
with
subscripts
of
10.
Above
10,
the
value
in a
DIM
statement
corresponds
to
the
largest
subscript
that
can
be
used
in
that
variable.
However
,
there
is
always a
zero
subscript.
As
a
result,
to
save
100
values
in a
single
dimension
array,
the
correct
DIM
statement
would
be
DIM A(99).
In
Integer
BASIC,
the
value
in a DIM
statement
corresponds
to
the
largest
subscript
that
can
be
used
with
that
variable.
An
Integer
variable
with
a
subscript
of
0
is
the
same
as a
variable
without
the
subscript
.
If
TEST(O)
= 27,
then
TEST
is
also
equal
to
27
and
vice
versa. With
string
variables,
there
is
no
0
subscript.
The
maximum
size
of
strings
and
arrays
depends
on
the
amount
of
available
memory
at
the
time
the
DIM
statement
was
executed.
If
the
DIM
statement
exceeds
the
amount
of
available
memory,
the
following
error
will
occur:
Applesoft
BASIC
Integer
BASIC
?OUT OF MEMORY ERROR
IN
line
***MEM
FULL
ERR
STOPPED
AT
line
where
line
is
the
line
of
the
DIM
statement.
Example.
--
Applesoft
DIM A$(10,5), C%(2,20)
In
the
preceding
example,
66
string
spaces
are
allocated
for
A$,
and
63
integer
variables
are
defined
for
C%.

Other manuals for Apple IIe

Related product manuals