Entering and Editing |
Complete editing of a line replaces the old line with the edited line. This resets all variables to zero or null. To end editing without losing prior variable values, exit the editing mode with the Q subcommand after the line number has been printed.
There are three ways to enter the Editing Mode:
1)Type EDIT line number, and
2)When entering text, type a Control A instead of a carriage return. This causes a carriage return, a space, and the computer prints an exclamation point. The cur- sor points at the first character of the sequence, and can be advanced by press- ing the space bar. If you use
3)If
In the Edit Mode, pressing RUBOUT will echo characters, but they are not deleted. Use the D subcommand to delete characters ,in the Edit Mode.
In the explanatory sections b~low, a typical line of program text is edited and re-
edited by each subcommand. The " . " indicates the position of the cursor or print head, and all characters are shown as they appear on the terminal. Such editing sub- commands as D, L, Carriage Return, Escape, and so on are represented in paren- theses: (CR), (ESC), (D), (4SE) to avoid confusion. You should tryout these or other examples to gain facility with the editor.
In the following sequence of edit subcommands, we will be editing line 40 of a hypothetical program. Line 40 returns a syntax error message, since it needs a PRINT instruction following ELSE, and should not contain OR:
40 IF A>B THEN 120 OR ELSE "NULL SET"
D Subcommand
The D subcommand is used to delete characters to the right of the cursor. Spaces are counted as characters. If there are less than n characters to the right of the cursor, just the remaining characters are deleted. The argument n is an integer in the range 1 to 255, and the default value is 1. The deleted characters are printed enclosed by backslashes, i.e., \characters\ .
The syntax of the D subcommand is:
[integer] D
In the example below, line 40 returned a SYNTAX ERROR message when the pro- gram ran.
40IF A>B THEN 120 OR ELSE "NULL SET"