107
EDIT Directive
Edit Line in Program
Formats
1. Edit: EDIT stmtref{D[string] | C[string] | R[string] | [string]}
`stmtref{D[string] | C[string] | R[string] | [string]}
2. Edit using back apostrophe :
Note: The square brackets above are part of the statement's syntax.
Where:
`
Back Apostrophe. ProvideX accepts this as a substitute for typing EDIT.
[string]
Add. String literal to add to the statement.
C[string] Copy. String literal contains the final character(s) of string to be copied.
D[string] Delete. String literal contains the final character(s) of the string to be deleted.
R[string] Replace. String literal is the new text to replace the existing string.
stmtref
Program line number or label to transfer control to.
Note: The EDIT directive is used in Command mode.
Description
Use the EDIT directive to change an existing statement in a program. ProvideX builds
a new statement based on the commands you use in the EDIT directive. The new
statement then replaces the existing one, unless you change the line number. (In the
latter case, the original statement remains in the program at the original line number,
and the new or resultant statement is added to the program at the new line number.)
If you do not include parameters following the statement reference, ProvideX
displays the specified line so that you can edit it directly using the keyboard.
Four options are available in the EDIT directive.
Delete text from statement. Use the D option to scan along the original statement up
to and including the given string without copying the data to the new statement. The
result omits the deleted portion of the string from the new statement.
Copy text from current statement to the new statement. Use the C option to scan
along the original statement from the cursor up to and including the given string,
copying the data to the new statement.
Replace text from current line in the new statement. Use the R option to append the
given string to the new statement while advancing over the corresponding number
of characters in the original statement.
Add text to the new statement. This option adds the given string to the new
statement.