EasyManuals Logo

Atari 400 Basic Reference Manual

Atari 400
122 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 #49 background imageLoading...
Page #49 background image
DIM
(DI.)
8
ARRAYS
AND
MATRICES
An
array
is
a
one-dimensional
list
of
numb
ers
assigned
to
subscripted
va
riables
;
e.g.,
A(O),
A(1), A(2).
Subscripts
range
from
0
to
the
dimensioned
value.
Figure
8-1
illustrates
a
7-element
arra
y.
A(O)
A(1)
A(2)
A(3)
A(4)
A(S)
A(6)
Figure
8-1.
Example
of
an
Array
A
matrix,
in
this
context,
is
a
two-dimensional
table
co
ntaining
rows
and
col-
umns.
Rows
run
horizontally
and
columns
run
v
erticall
y.
Matrix
elements
are
stored
by
BASIC
in
row
-m
a
jor
order.
This
means
that
a
ll
the
e
lem
ents
of
the
first
row
are
stored
first,
followed
by
all
the
elements
of
the
second
row,
etc
.
Figure
8-2
illustrates
a 7 x 4
matrix.
Columns
M(O,O)
M(0,1) M(0,2)
M(0,3)
M(1,0)
M(1
,1)
M(1,2)
M(1,3)
M(2,
0)
M(2,1)
M(2,2)
M(2,3)
M(3,
0)
M(3,1)
M(3,2)
M(3,3)
M(4,0) M(4,1) M(4,2) M(4,3)
M(5,
0)
M(5,1) M(5,2) M(5,3)
M(6,0) M(6,1) M(6,2)
M(6,3)
Figure
8-2.
Example
of
a
Matrix
This
section
describes
the
two
commands
associated
with
arrays,
matrices,
and
strings,
a
nd
how
to
load
both
arrays
and
matrices.
The
com~a
nds
in
this
se
c-
tion
are:
DIM
CLR
Format:
D M {
svar(aexp)
}
1
mvar(aexp[
,aexp])
IJ{
,svar(aexp)
}tl
~
,mvar(aexp[
,aexp
... ] U
Examples:
DIM A(100)
DIM M(6,3)
DIM B$(20)
used
w
ith
STRINGS
An
a
,v
s
and
Matr·ices
41

Table of Contents

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