Please enable JavaScript to view this site.

ESL Documentation

Definition

Specify a block of text in a textual region.

block [column] COL_NO [ line] line_NO

[thru [column] COL_NO [ line] line_NO]

COL_NO

An integer value representing a column number in a textual region.

line_NO

An integer value representing a line number in a textual region.

Description

A block is any rectangular area within a textual region. To define a block, specify any two opposite corner positions, as follows:

upper left followed by lower right

lower right followed by upper left

upper right followed by lower left

lower left followed by upper right

A block can include character positions that do not contain any actual text.

If you omit the keywords column and line, the first and third integer values are used as column values, and the second and fourth integer values are used as line values.

If you provide only one set of column and line numbers, the block will be a single-character position.

Color attributes are preserved in blocks from colored textual regions. (If the block is colored but the destination textual region is not, color attributes are dropped.)

Use this statement only with textual regions, with the insert, overwrite, and blank block drawing statements, the make block and remove action statements, and the textual built-in function.

If you attempt to define a block for a class that has objects other than textual regions, or for any object other than a textual region, ESL generates an error message.

Example

block column 8 line 3 thru column 3 line 1

from Writer_TR

block 3 1 thru 8 3 from Writer_TR

# The following example shows how to use block to copy

# a column of numbers.

key CopyJan ...

parameter is "8" # Column number of column

key CopyFeb ... # where data starts stored

parameter is "12" # in parameter of each key

key CopyMar ...

parameter is "16"

class CopyAMonth_CL is CopyJan CopyFeb CopyMar

textual region FirstQuarter ...

insert " Jan Feb Mar\n"

insert "Sales 100 200 300\n"

insert "Costs 50 75 100\n"

insert "Profit 50 125 200\n"

textual region SelectedMonth_TR

...

integer StartCo1_IV

response to CopyAMonth_CL

copy parameter of object to StartCo1_IV

change SelectedMonth to_TR

insert block

column StartCo1_IV line 1

thru column (StartCo1_IV + 3)

line (bottom of FirstQuarter_TR)

from FirstQuarter_TR

See Also

blank block Drawing Statement

insert Drawing Statement

make block and make segment COLOR Action Statements

overwrite Drawing Statement

remove Action Statement

textual Object Inquiry Built-in Function