RUN:
EXECUTING INSTRUCTIONS
To
make the computer execute your program, you have to type RUN.
The
RUN
command tells the computer to carry out its instructions.
Type
RUN
and press
[R
eturnl to see what happens:
RUN
I
HEARD
OF
A
POET
NAMED
SAM
The computer's first and only instruction, line 10, was to print the
words inside the quotation marks. Clear the screen, type
RUN
again,
and press IReturnl . The computer follows its instruction again and
prints I HEARD OF A
POET
NAMED
SAM
.
Even
though the instruction is
no
longer
on
the screen, the computer
remembers what to do. Your program
is
stored
in
RAM
(Random
Access Memory), the programmable section of the computer's
memory. When you type
LIST
, the computer shows
on
the screen all
the instructions stored
in
the
RAM
portion of its memory. Type
LIST.
Your screen should look like this:
LIST
1.9
PRINT
"I
HEARD
OF
A
POET
NAMED
SAM"
If your screen looks different, you might have forgotten to press
IReturnl at the end of each entry or to type
LIST
on
a line by itself.
Type
in
the line below, then give the
RUN
command:
29
PRINT
"I
MET
HIM
ONE
DAV
..
AND
TO
MV
DISMAV
..
"
RUN
The words enclosed
in
the quotation marks
in
both lines of the pro-
gram appear
on
the screen. Type LIST to see the instructions that the
computer
has
stored
in
RAM.
Both lines
10
and
20
appear.
LINE NUMBERING: CREATING ORDER
Each instruction line
in
a BASIC program must have a number
in
front
of it. The numbers are called " line numbers." The computer executes
the instructions, beginning with the smallest number and continuing
through the program until all the instructions have been carried out.
The
usual procedure is to number lines by te
ns
so that enough
numbers are available for inserting additional lines later, if desired. Try
inserting a line now. Add line
15
(shown
on
the
ne
xt page) and instruct
the computer to
run
the program. Your screen should look like the
following:
36