line 15.
Last, type
LIST
15
You will now see on the screen
15 LET YEAST=40
20 PRINT BUTTER,YEAST
Line 10 has vanished from the screen, but it is still in your program - which you can prove by pressing
NEWLINE
again. The only effect of
LIST
15 are to produce a listing that starts at line 15, & to put the
program cursor at line 15.
LIST
on its own makes the listing start at the beginning of the program.
Summary
Programs
Editing programs using , &
EDIT
.
Statements:
RUN
,
LIST
Exercises
1. Modify the program so that it displays not only the two prices, but also messages to ahow which is
which.
2. Use the
EDIT
ket to change the price of butter.
3. Run the program & then type
PRINT
BUTTER,YEAST
The variables are still there, even though the program has finished.
4. Type
12 (&
NEWLINE
)
Again, the program cursor will be hidden between lines 10 & 15. Now press
EDIT
, & line 15 will come
down: when the program cursor is hidden between two lines,
EDIT
brings down the second one. Type
NEWLINE
to clear the bottom part of the screen.
Now type
30
This time, the program cursor is hidden after the end of the program; & if you press
EDIT
, then line 20
will be brought down.
5. Put a
LIST
statement in the program so that when you run it, it lists itself.