contents.gifprev1.gifnext1.gif

ERASE_CHARACTER

Description:

Deletes character(s) at the current editing position and returns them as a string. The number of characters to delete is passed as a parameter by specifying an integer value. The direction in which to delete is determined by whether the integer is positive or negative. ERASE_CHARACTER doesn't cross line boundaries and will cause padding if the current window position is mid-tab or past the end of a line.

Syntax:

string := ERASE_CHARACTER (integer)

Examples:

The following deletes five characters starting at the cursor position and going right.

ERASE_CHARACTER (5);

The following deletes ten characters starting at the cursor position and going left, placing the deleted characters into the string variable prior_10.

prior_10 := ERASE_CHARACTER (-10);

Errors:

TPU$_NOCURRENTBUF Not in a buffer.

TPU$_NOTMODIFIABLE Current buffer is READ_ONLY.

Related Builtins:

DELETE

ERASE

ERASE_LINE