TPUHELP.HLB  —  MODIFY_RANGE
  MODIFY_RANGE

  Allows a DECTPU application to change the starting delimiter, ending
  delimiter, or video attribute of a range.

  Syntax

     MODIFY_RANGE (range, [{start_mark | delimiting_keyword},
                           {end_mark | delimiting_keyword}]
                          [,video_attribute])

  Parameters

     range                The range to be modified.

     start_mark           The starting mark for the range.

     end_mark             The ending mark for the range.

     delimiting_keyword   A keyword indicating the point in the buffer where
                          you want the range to begin or end.  The valid
                          keywords and their meaning are as follows:

                          Keyword         Meaning
                          -------         -------

                          LINE_BEGIN      The beginning of the current
                                          buffer's current line.

                          LINE_END        The end of the current
                                          buffer's current line.

                          BUFFER_BEGIN    Line 1, offset 0 in the
                                          current buffer.  This is
                                          the first position where
                                          a character could be
                                          inserted, regardless of
                                          whether there is a character
                                          there.  This is the same as
                                          the point referred to by
                                          BEGINNING_OF (CURRENT_BUFFER).

                          BUFFER_END      The last position in the
                                          buffer where a character
                                          could be inserted, regardless
                                          of whether there is a character
                                          there.  This is the same as
                                          the point referred to by
                                          END_OF (CURRENT_BUFFER).

     video_attribute      A keyword specifying the new video attribute for
                          the range.  By default, the attribute is not
                          modified.  You can use the keywords NONE, REVERSE,
                          UNDERLINE, BLINK, or BOLD to specify this
                          parameter.

  Comments

     If you want to specify the fourth parameter (the attribute) but not the
     second and third (the start and end delimiters), you must use commas as
     placeholders, as follows:

     MODIFY_RANGE (the_range, , ,BLINK);

  Examples

     1.  The following statement sets the video attribute of the range
         assigned to the variable "this_range" to BLINK:

         MODIFY_RANGE (this_range, , ,BLINK);

     2.  The following statement alters the delimiters of the range assigned
         to the variable "the_range" so the range begins at the point marked
         by "mark1" and ends at the end of the current line:

         MODIFY_RANGE (the_range, mark1, LINE_END);

     3.  The following code fragment creates a range between the editing
         point and the pointer cursor location.  At a later point in the
         program, after which the user might have moved the pointer cursor,
         the code fragment modifies the range to reflect the new pointer
         cursor location.

         begin_mark := MARK (BOLD);
         POSITION (MOUSE);
         finish_mark := MARK (BOLD);
         this_range := CREATE_RANGE (begin_mark, finish_mark, BOLD);
         !  .
         !  .  (User may have moved mouse)
         !  .
         POSITION (MOUSE);
         new_mark := MARK (BOLD);
         IF new_mark <> finish_mark
         THEN
             MODIFY_RANGE (this_range, begin_mark, new_mark, BOLD);
         ENDIF;

  Related Topics

     MARK     CREATE_RANGE
Close Help