EasyManua.ls Logo

Commodore VIC-20 - Page 97

Commodore VIC-20
308 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...
USING
READ
AND
DATA
STATEMENTS
Large
amounts
of
data
can
be
typed
in
as
one
piece
of
data
at
a
time,
over
and
over
again
... or
you
can
print
the
instructional
part
of
the
program
ONCE
and
print
all
the
data
to
be
handled
in
a
long
running
list
called
the
DATA
statement.
This
is
especially
good
for
crowding
large
lists
of
numbers
into
a program.
USING
ARRAYS
AND
MATRICES
Arrays
and
matrices
are
similar
to
DATA
statements
in
that
long
amounts
of
data
can
be
handled
as a
list,
with
the
data
handling
portion
of
the
program
drawing
from
that
list,
in
sequence.
Arrays
differ
in
that
the
list
can
be
two
or
three
dimensional.
ELIMINATING
SPACES
One
of
the
easiest
ways
to
reduce
the size
of
your
program
is
to
eliminate
all
the
spaces. Although
we
often
include
spaces
in
sample
programs
to
provide
clarity,
you
actually
don't
need
any
spaces
in
your
program
and
will
save
space
if
you
eliminate
them.
USING
GOSUB
ROUTINES
If
you
use
a
particular
line
or
instruction
over
and
over,
it
might
be
wise
to
GOSUB
to
the
line
from
several
places
in
your
program,
rather
than
write
the
whole
line
or
instruction
every
time
you use
it.
USING
TAB
AND
SPC
Instead
of
PRINTing
several
cursor
commands
to
position
a
character
on
the
screen,
it
is
often
more
economical
to
use
the
TAB
and
SPC
instructions
to
position
words
or
characters
on
the
screen.
81

Other manuals for Commodore VIC-20

Related product manuals