You can move the copy cursor elsewhere on the screen at any time whilst
copying, so you can copy sections from several different lines to create a
completely new line. If you want to abandon editing a line half-way through,
press . Do not press , as your old line will be replaced by the
partially-edited version.
AUTO
Earlier you saw that program lines are usually numbered in tens. This leaves
plenty of free line numbers for any statements that are inserted later. If you
wish, the computer can automatically number lines for you. Remove the
current program using NEW and then type:
AUT0
The computer prints 10 and waits for you to type a statement. Type the
following, remembering to press after each line. (You can still use the
editing facilities: most of line 40 can be copied from line 20, for example.)
10 PRINT "A short program"
20 PRINT "What is your first number " ;
30 INPUT first
40 PRINT "What is your second number " ;
50 INPUT second
60 PRINT first; " plus ";second; " gives "; first+tsecond
After the last line the computer prints 70. As the program is complete, press
-- you no longer want the computer to generate new line numbers. You
can now LIST or RUN the program.
AUTO can be used to begin numbering at any line number, with any interval
in between. The default interval is ten, so AUTO 100 produces line 100, 110,
120 and so on. AUTO 15,1 would produce line numbers 15, 16, 17 etc.
LIST
You have already used LIST, but an extended LIST command is also available
which is useful as a cross-reference in longer programs. Try typing:
LIST IF PRINT
and
LIST IF first
In other words LIST IF displays only those lines containing the specified
sequence of characters.
C 8