40
User's
Handbook
to
the
Atari
400/ 800
Computers
screen
with
the
LIST
statement.
Once
that
line
has
been listed
to
the
screen,
it
can be
edited
using the cursor
control
keys
as
described in
Chapter
2.
Once
the desired changes have been made, these must be made
permanent.
This
is
accomplished by pressing the Return key
while
the cursor
is
within
that line. Unless the Return key
is
pressed
somewhere
within
the
line
being
edited,
any changes
made effect
only
the video display. The cursor can be
positioned
anywhere
within
the program line when Return
is
pressed.
NEW
Command
You may have
noticed
the
execution
of
the
NEW
command
in
Illustration
3-1
. The NEW
command
is
used to erase
an
old
program
from
memory
before
a n
ew
one
is
typed in.
The Atari can
only
store
one
program in
RAM
at
anyone
time.
If
you
attempt
to
enter
a
new
program
while
another
program
is
already stored in
RAM
, the
new
program
will
be merged
with
the
existing
program
.
END Statement
Notice
the last line in the program in Illustration 3-1. That line
consists
only
of
the
line
number
plus the BASIC reserved
word
END.
The END statement identifies the end
of
a
program
, and instructs
Atari BASIC
to
return
to
the
imm
ediate
mode
.
Obviously,
the
END statement should be the last line in
your
program.
Actually, Atari
BASIC does
not
require
an
END statement.
When
the program's final statement isexecuted,
it
will end. However,
it
is
good
programming
practice
to
end a BASIC program
with
the
END statement.
Executing a Program
A
program
is
executed in the program
mod
e by
entering
the
RUN
command.
This
is
shown in Illustration
3-1.
Every
time
RUN