MARK
Returns a marker located in the specifed buffer, column, and record.
By default, the marker returned is located on the character in the
current buffer to which the editing point is tied. The MARK built-in
also sets the video attribute for displaying the character on which the
marker is located (if any) when that character is visible on the
screen.
Syntax
marker := MARK ({NONE | BLINK | BOLD | REVERSE | UNDERLINE
| FREE_CURSOR} [, {buffer | window} [, integer1
[, integer2]]])
Parameters
NONE Applies no video attributes to the marker.
BLINK Causes the marker to blink.
BOLD Causes the marker to be bolded.
REVERSE Causes the marker to be displayed in reverse video.
UNDERLINE Causes the marker to be underlined.
FREE_CURSOR Creates a free marker if you use the statement MARK
(FREE_CURSOR) while the cursor is at a location
containing no character, such as a location beyond the
end of a line. A free marker has no video attribute.
TPU does not insert padding blanks between a free
marker and the nearest character. If you use the
statement MARK (FREE_CURSOR) while the cursor is on a
character, the resulting marker is tied to the
character and is not free.
buffer The buffer in which the marker is to be located. By
default, TPU locates markers in the current buffer.
window The window that is mapped to the buffer in which the
marker is to be located. You can specify a window
variable only if the window is mapped to a buffer. By
default, TPU locates markers in the current buffer.
integer1 The screen column corresponding to the buffer offset
where the marker is to be located. This integer
specifies the marker's location in the horizontal
dimension. You can specify any integer greater than or
equal to 1 without causing an error. However, the
maximum record length in TPU is 32,767 characters.
If you specify an integer greater than 32,767, the
record is truncated after the 32,767th character. If
you specify an integer smaller than the record's left
margin or greater than the end of the line, TPU
places the marker in the specified location and inserts
padding blanks in the buffer between the marker and the
nearest text. By default, TPU locates the marker in
the buffer offset corresponding to the current screen
column. Note that TPU performs the conversion from
screen column to buffer offset for you; you merely
specify the desired screen column. Note, too, that in
cases where a window has been shifted, you still
specify the column in relation to screen column 1 (the
leftmost column on the screen), not in relation to the
leftmost visible screen column.
integer2 The number of the record in the buffer where the mark
is to be located. This integer specifies the marker's
location in the vertical dimension. If no limit has
been set on the maximum number of lines in the buffer,
this parameter can have any integer value greater than
or equal to 1. If a limit has been set for the maximum
number of records in the buffer, the value of this
parameter must be less than or equal to the limit. By
default, TPU places the marker in the current
record.
Comments
If you create a marker in a location containing no character and
specify a parameter other than FREE_CURSOR, TPU inserts padding
blanks between the marker and the nearest character. In such a
situation, the marker is bound. If you fill text containing these
padding blanks, the white space created by the blanks is preserved in
the filled text.
If you use the optional parameters to specify a location that has no
text associated with it, TPU places padding blanks in the space
between the new marker and the nearest character.
If you create a marker in a location containing no character and
specify the parameter FREE_CURSOR, TPU does not insert padding
blanks. If you fill text surrounding this marker, no white space is
created in the filled text.
Once a marker is tied to a character, it cannot become a free marker.
To determine whether a marker is bound or free, use the following call:
boolean_variable := GET_INFO (marker_variable, "bound");
To determine the number of character positions between a free marker
and the nearest character, use the following call:
boolean_variable := GET_INFO (marker_variable, "glyph_offset");
To determine why a marker is free rather than bound, use one or more of
the following calls:
boolean_variable := GET_INFO (marker_variable, "before_bol");
boolean_variable := GET_INFO (marker_variable, "beyond_eol");
boolean_variable := GET_INFO (marker_variable, "middle_of_tab");
boolean_variable := GET_INFO (marker_variable, "beyond_eob");
Examples
1. user_mark_under := MARK (UNDERLINE);
Puts a marker at the row and column position corresponding to the
active editing point. On the screen, the character at that marker
is underlined.
2. remote_marker := MARK (FREE_CURSOR, CURRENT_BUFFER, 1, 50);
Puts a free marker in the current buffer in the leftmost character
offset on the 50th record.
Related topics
POSITION SELECT CREATE_RANGE FILL