Drawing Statement
Replace text with a string value, a text segment, or a text block.
overwrite
{ [at cursor] [text] TEXT_STRING
| segment [column] COL_NO [line] LINE_NO
[thru [column] COL_NO [line] LINE_NO] from TR_NAME
| block [column] COL_NO [line] LINE_NO
[thru [column] COL_NO [line] LINE_NO] from TR_NAME }
at cursor
Replace each character in succession. After execution, the text cursor is on the first character immediately following the last overwritten character.
If the text cursor is at the column after the last character in a line, the overwrite is performed as if it were an insert statement, and the line is extended.
TEXT_STRING
A string value representing the overwriting text.
segment
Overwrite with the specified segment.
column COL_NO
The identifier for a column in the textual region that you are using as the source.
line LINE_NO
The identifier for a line in the textual region that you are using as the source.
from TR_NAME
The identifier for a textual region.
block
Overwrite with the specified block. If the block contains character positions that do not contain any text, these positions contain blanks when the block overwrites text. After execution, the text cursor has not moved.
Description
Use this statement to replace text in a textual region with any string value, or with any text segment or text block from any textual region.
These statements can be used only with textual regions.
The overwrite statement replaces text with the specified text string, segment, or block. The replacement begins at the current position of the text cursor.
If the text cursor is at a location where there is no text when the overwrite statement is encountered, ESL inserts the necessary blanks in front of the text cursor.
If you overwrite text in a colored textual region with a string, segment, or block from an uncolored textual region, the new text will take on the color specifications of the overwritten characters.
If the specified segment or block overlaps the text to be overwritten, ESL returns an error message and does not perform the overwrite operation.
If the program is compiled with External Strings, then any string literals used in this statement will be externalized.
Example
response to Chalk
change Writer to
overwrite "cat"
response to Chalk
change Writer to
overwrite segment 3 1 thru 10 4 from OldText
response to Chalk
change Writer to
overwrite block 1 1 thru 7 4 from OldText
See Also
block Definition
segment Definition