Purpose: REPLACE allows a line or range of lines to be replaced with lines that are typed in at the terminal. More or fewer new lines can be entered than what is wished to be replaced. ACCENT R will renumber following lines if necessary to accommodate all new lines. Terminate the REPLACE mode by typing REPLACE END as the first entry on a new line or by typing Control-Z anywhere.
REPLACE line1 [:line2] [BY incr]
line1 |
is a line to be replaced or the first line of a line range to be replaced. |
line2 |
is the last line of a range to be replaced. |
BY incr |
specifies the value by which the replacement line numbers are to be incremented. The default, if this option is not included, is 10. A comma (,) can be used instead of BY. |
00010 A
00020 B
00030 C
00040 D
00050 E
00060 F
--REPLACE 30:40
00030 1
00040 2
00050 3
00060 4
00070 END
2 LINE(S) DELETED
00010 A
00020 B
00030 1
00040 2
00050 3
00060 4
00061 E
00062 F
NOTES: REPLACE combines the functions of DELETE and INSERT. It deletes all lines in the range specified, then prompts for new lines. By default, REPLACE with no options begins prompting with the line number of the first line deleted, then increments further line number prompts by 10. Enter as many new lines as is needed. If necessary, ACCENT R will renumber existing lines that follow the range of lines deleted to accommodate the new lines.
SLIM may be invoked to edit the current or the previous replacement line. The use of SLIM is described earlier in this chapter.