You can copy a text block from one textual region into another, or from one place to another in the same textual region, as long as the block does not overlap the current text cursor's position. (If an overlap occurs, no block will be selected, and an error message will be placed in the errorlog.)
To copy a specified text block, use the block specification. The specified block is inserted beginning at the current position of the text cursor, and any text is moved to the right on a line-by-line basis. The lines are not moved down. Suppose the source textual region OldTxt contains the following:
and the destination textual region NewTxt contains the following, with the text cursor at column 1, line 1 as shown:
When the following insert statement is executed:
response to ...
add to NewTxt
insert block column 1 line 1 thru column 6 line 6
from OldTxt
NewTxt looks like this:
Note that the text cursor does not move. After execution of the insert statement, it is at the same column and line position as before - only now it is on the first character of the inserted block.
Also note that some character positions are padded with blanks to form a rectangle. Since a text block is based on a rectangular portion of the textual region, it can include character positions which do not contain any text. These positions are always padded with blanks when the block is inserted. And, unlike a segment, a block can begin anywhere after the last character of the last line in a textual region - ESL will simply pad the entire inserted area with blanks.
Like segments, color attributes are preserved when blocks from a colored textual region are inserted into another place in the same region or into another colored textual region.