Please enable JavaScript to view this site.

ESL Documentation

A block is any rectangular area within a textual region. You can copy a block, use it to overwrite existing text, replace it with blanks, or remove it. The block definition itself must appear within an insert, overwrite, or blank drawing statement.

 

In the definition, you specify integer values for the starting and ending column and line character positions for the block. The block includes the first and last character positions specified.

 

If you omit the column and line keywords, the first and third integer values always specify the column numbers, and the second and forth integer values always specify the line numbers. If you omit the thru keyword - that is, if you only provide one set of column and line numbers - the block will be a single character position.

 

But here the similarities between blocks and segments end. Because a block defines a rectangular portion of a textual region, the block might not contain all contiguous characters from the beginning of the block to the end of it.

For example, if you specify:

 

response to ...

    add to NewTxt

        insert block column 3 line 1 thru column 8 line 3

            from OldTxt

 

the following text block from the OldTxt is inserted into NewTxt:

 

_img78

 

The block can be defined by any two opposite corners:

 

Upper left/lower right

Upper right/lower left

Lower left/upper right

Lower right/upper left

 

The following are all valid block definitions, defining the same text block as shown in the above illustration:

 

# Upper left through lower right:

insert block column 3 line 1 thru column 8 line 3 from

A

# or:

insert block 3 1 thru 8 3 from A

 

# Lower right through upper left:

insert block column 8 line 3 thru column 3 line 1 from A

# or:

insert block 8 3 thru 3 1 from A

 

# Upper right through lower left:

insert block column 8 line 1 thru column 3 line 3 from A

# or:

insert block 8 1 thru 3 3 from A

# Lower left through upper right:

insert block column 3 line 3 thru column 8 line 1 from A

# or:

insert block 3 3 thru 8 1 from A

 

Also, unlike a segment, a block can begin and/or end anywhere beyond the last character of the last line in a textual region.