If you make a typing mistake while entering your program, you can correct it easily.
To erase the last character of the current line, press the RUB key while holding down the SHIFT key. Continue to hold down the SHIFT key and press the RUB key repeatedly to erase as many characters as you wish from the end of the current line. You can erase several characters more easily by pushing SHIFT RUB, once, as described and then holding down the REPEAT key for as many characters as you wish (or tapping the REPEAT key once for each successive erasure).
Example:
You intend to type: 10 PRINT A+B
You actually type: 10 PRIMT A+B
Press SHIFT RUB once, and then tap the REPEAT key quickly five times. The result is: 10 PRI
Now continue typing the correct characters: 10 PRINT A+B
The result in the Sorcerer's memory is: 10 PRINT A+B
Push the @ key to erase the entire current line. This prints an @ on the screen at the end of the line and removes the line from Sorcerer's memory; it does not erase the line from the video display. (You cannot delete a line with the @ key after you hit the RETURN key, because hitting RETURN establishes a new current line.)
To correct a previous line of program (not the current line), just type its line number, followed by the correct instruction. To delete an old line entirely, type its line number and then press RETURN
Example:
You have entered:
10 PRINT 1+2
20 PRITM 2+3
30 PRINT 3+4
To correct line 20, type: 20 PRINT 2+3 RETURN
To delete line 20 entirely, type: 20 RETURN
To insert a line between two lines, just assign it a line number between the numbers of the old lines.
Example:
You have entered:
10 PRINT 1+2
20 PRINT 2+3
30 PRINT 3+4
If you now enter:
15 PRINT
25 PRINT
The result in the Sorcerer's memory will be:
10 PRINT 1+2
15 PRINT
20 PRINT 2+3
25 PRINT
30 PRINT 3+4
Use the command LIST to get a listing of the program currently in memory. The Sorcerer lists all the instructions in line-number order, until it reaches the end of the program.
Example:
You enter:
10 PRINT "TEST PROGRAM"
20 PRINT 1+1
30 PRINT 2+2
15
PRINT
25 PRINT
40 PRINT "END OF PROGRAM
35 PRINT
You now type: LIST
Sorcerer's reply:
10 PRINT "TEST PROGRAM"
15 PRINT
20 PRINT 1+1
25
PRINT
30 PRINT 2+2
35 PRINT
40 PRINT "END OF PROGRAM"
You can make the Sorcerer pause in the middle of the listing by pressing RUN STOP. Release the key and the listing continues. To stop the listing completely, press the CTRL and C keys together (as described in Chapter 1, "Two Key Commands"). (After this, we will shorten "press the CTRL and C keys together" to "press CTRL C.")
You can list a program beginning at any line number by specifying that line number in the command. The command LIST 100 lists the program currently in memory from line 100 to the end. If there is no line 100, the listing begins at the next higher line.
Remember that LIST merely brings forth an ordered listing of your program. To see what the program actually does (or whether it in fact works), type RUN.
You may recall from the previous chapter that the Sorcerer changes all lower case instructions to upper case.
Example:
You type:
10 rem a program to look at lower case
20 print "I CAN TYPE IN
UPPER CASE."
30 print
40 print "I can type in lower
case."
list
Sorcerer replies:
10 REM a program to look at lower case
20 PRINT "I CAN TYPE IN
UPPER CASE."
30 PRINT
40 PRINT "I can type in lower
case."