DELETE

Sometimes you will find you need to remove lines from a program. Single lines

can be deleted by typing the line number and pressing RETURN. A number of

lines in sequence can be deleted using the DELETE command. Try typing:

DELETE 20.50 RETURN

LIST RETURN

which deletes all line numbers from 20 to 50 inclusive.

RENUMBER

If you have inserted many extra lines in a program you can tidy it up by using

RENUMBER to spread the line numbers out at intervals of 10. Renumbering

always begins from the first line of the program. Like AUTO, you can use

variations such as RENUMBER 100,5 to make the first line 100 and successive

lines 105, 110, etc.

REM

The REM statement enables you to put remarks within a program to remind

yourself or others what parts of the program do. Sensible variable names can

make a program largely self-documenting, but REMs are useful to summarise

the purpose of a number of lines:

100 REM Lines 110 to 150 plot a circle

500 REM Find the largest number and print it

The computer ignores any line beginning with a REM statement when a

program is run.

Minimum abbreviations

If you are not used to a keyboard you may find it tedious to pick out the correct

letters to type PRINT, for example. The computer recognises BASIC keywords

if they are spelt in full or if an allowed abbreviation is used. Type:

P. "Hello" RETURN

This is exactly the same as:

PRINT"Hello" RETURN

and is obeyed as such. Similarly, I. is the abbreviation for INPUT. Use NEW to

remove the current program, select AUTO line numbering and then type in the

following program, which uses several abbreviated keywords:

10 P. "Pick a number " ;

20 I. choice

C 9