EasyManuals Logo

Atari 400 User Manual

Atari 400
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 400

Questions and Answers:

Question and Answer IconNeed help?

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

Atari 400 Specifications

General IconGeneral
ManufacturerAtari
Model400
TypeHome Computer
Release Year1979
CPUMOS Technology 6502
CPU Speed1.79 MHz
ROM10 KB
Operating SystemAtari OS
KeyboardMembrane keyboard
RAM8 KB (expandable to 48 KB)
GraphicsANTIC and GTIA chips
Sound4 channels
DisplayRF output for connection to TV
StorageOptional cassette tape drive or floppy disk drive
PortsCartridge
Display Resolution320x192 (16 colors)

Related product manuals