Chapter 8 - Computer programming
And now at last you shall write a computer program. Turn the computer off & on, just to make sure that it is
clear. Now type
10
LET
BUTTER=75 (&
NEWLINE
)
& the screen will look like this:
This is different from what happened with EGGS in chapter 6; if you type
PRINT
BUTTER
you will see (from the report 2) that the variable BUTTER has not been set up. (Press
NEWLINE
again &
the screen should go back to looking like the picture.)
Because the
LET
statement had a number, 10, in front of it, the computer did not execute it straight
away, but saved it for later. 10 is its line number
, & is used to refer to it rather in the same way that names
are used to refer to variables. A set of these stored statements is called a
program
. Now type
20
PRINT
BUTTER
& the screen should look like this:
This is a listing of your program. To have the program carried out (or executed or run), type
RUN
(don't forget the
NEWLINE
)