EasyManuals Logo

Atari 800 User Manual

Atari 800
326 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
Page #51 background imageLoading...
Page #51 background image
Introduction
to
Atari BASIC
49
Before a
string
variable can be used in a
program
,
it
must first
be
dimensioned
with
the
DIM
state
ment.
If
a
string
variable
is
not
dimensioned
before
it
is
used in a program,
the
error
9
will
occur.
A
string
variable
is
dimensioned
by
giving
its name
and
its
maximum
size
after
the
reserved
word
DIM
. The
maximum
size
must be enclosed in parentheses. The
following
DIM
statement,
100
DIM
A$(5)
dimensions
a five
character
string.
More
than
one
string
variable
can be
dimen
s
ioned
in a single
DIM
statement. For
example,
the
following
DIM
statement,
100
DIM
A$(10), B$(5), C$(7)
would
dimension
3
string
variables.
Tables & Arrays
Earlier in
thi
s
chapter,
we
introduced
the
concept
of
variables. A
variable
is
designed
to
hold
a single data
item--either
string
or
numeric.
However
, some
programs
req
uire
that
hundreds
or
even
thousands
of
variable names
be
used.
Obviously,
the
use
of
thousands
of
individual
variable names
could
prove
extremely
cumbersome.
To
overcome
this
problem
, BASIC
allows
the
use
of
subscripted
variables.
Subscripted variables are
identified
with
a subscript, a
number
appearing
within
parentheses
immediately
after
the
variable
name
.
An
example
of
a
group
of
subscripted
variables
is
given
below:
A(O),
A(l),
A(2), A(3), A(4), ... , A(100)
Note
that each
subscripted
variable
is
a
unique
variable. In
other
words,
A(O)
differs
from
A(l),
A(2), A(3), A(4), etc.
Subscripted variables
should
be
visualized
as
an array
(or
table).
In
our
previous
example,
the
data
contained
in
the
array
defined
by A
would
consist
of
one
row
with
101
columns
in it. Such an
array
is
a
single-dimension
array.

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 800 and is the answer not in the manual?

Atari 800 Specifications

General IconGeneral
ProcessorMOS Technology 6502
Processor Speed1.79 MHz
ROM10 KB
GraphicsANTIC and GTIA chips
Release Year1979
Display Resolutionup to 320 x 192
Colors128 colors
Sound4 channels
StorageCartridge, cassette, floppy disk
PortsCartridge, serial, monitor
Operating SystemAtari OS

Related product manuals