Skip to content

ERASE

Erase File

This directive removes a file name from a logical disk directory and makes the physical disk space that the file occupied available for use by the system.

ERASE file-name [,ERR=line-ref|,ERC=error-code]
file-name
is any string of 8 characters or fewer to name this file.
line-ref
is the program line number or label to branch to if this directive produces an error.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

If an attempt is made to ERASE an OPEN file, an ERR=0 results.

If an attempt is made to ERASE a file whose name is not found on any available logical disk directory, an ERR=12 results.

ERASE "INDEX"

removes the file name “INDEX” from its logical disk directory and makes it unavailable to any task.

ERASE A$, ERR=7999

If A$=“INDEX”, has the same effect as the first example and branches to program line 7999 if the directive produces an error condition.

INITFILE directive

From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF