EasyManua.ls Logo

Atari XL - Page 235

Atari XL
262 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...
APPENDIX
3
SPEEDING UP PROGRAMS
There
are
several
things
you
can
do to
increase
the
running
speed
of
your
BASIC
programs.
Unfortunately,
this
is
usually
at
the
expense
of
clarity,
and
you
may
find
it
useful
to
keep
a 'slow',
but
easy-to-follow
version
of
your
program
should
you
wish
to
amend
it
at
a
later
date.
1 Remove
all
unnecessary
spaces
andREMs
from
the
program.
A
small
speed
increase
will
result,
because
BASIC
will
not
have
to
skip
over
redundant
spaces
to find
executable
commands.
2
Always
use
variables
instead
of
constants.
The
XL
can
handle
variables
much
more
rapidly
than
numbers.
This
is
especially
important
in
FOR
...
NEXT
loops.
3
Use
as
many
statements
per
line
separated
by ':'
as
possible.
4
Re-use
the
same
variables
whenever
possible.
5
Use
the
zero
elements
of
arrays
when
possible.
6
Assign
often
used
variables
early
on
in
the
program.
The
XL
stores
all
variables
in
a
table.
The
first
declared
variables
are
the
first
in
the
table
and
are
found
more
quickly.
223