contents.gifprev1.gifnext1.gif

COPY_TEXT

Description:

COPY_TEXT places a copy of the specified text at the current edit position. The source text is duplicated. The current character position is padded with spaces if the position is mid-tab, past EOL, or past EOB. Note that COPY_TEXT supports both INSERT and OVERSTRIKE modes. Buffers and ranges cannot be both source and target. If the first argument is of type box range, the input text will be handled as box text using either insert or overstrike mode. SET(box_range, ON) is not required for COPY_TEXT to accept box range input text.

Syntax:

range := COPY_TEXT ( {buffer | range | string} )

Examples:

The following takes the contents of PASTE$BUFFER and copies it to the edit position of the current buffer.

COPY_TEXT (PASTE$BUFFER);

The following example creates a box range of 2 columns by 3 rows and inserts the text at the current edit position of TEST$BUFFER.

SELECT$POINT := SELECT (REVERSE);

SET(BOX_RANGE, ON);

MOVE_HORIZONTAL (2);

MOVE_VERTICAL (3);

BOX$TEXT := SELECT$RANGE;

POSITION (TEST$BUFFER);

COPY_TEXT (BOX$TEXT);

Errors:

TPU$_NOCOPYBUF Copying a buffer to itself not allowed.

TPU$_NOCURRENTBUF Not in a buffer.

TPU$_NOTMODIFIABLE Current buffer is READ_ONLY.

TPU$_OVERLAPRANGE Can't place a range into itself.

Related Builtins:

DELETE

ERASE

MOVE_TEXT

SELECT_RANGE

SET(BOX_RANGE)