DELETE Verb - Delete Program Line(s)

Syntax

DELETE {linerefA}{{,}{linerefB}}

Description

The DELETE verb removes a line or a range of lines from a program. The following examples show different forms of the DELETE statement:

Syntax Form

Deletes

DELETE

All lines in a program.

DELETE 100

Line 100 from a program.

DELETE 100,

Line 100 and all lines that follow.

DELETE,200

Lines from the beginning of a program through line 200.

DELETE 100,200

All lines from 100 through 200, including 100 and 200.

Deleting any lines that contain active GOSUB or FOR verbs, or any statement with an error that is pending a RETRY, results in an !ERROR=27. To correct the error, execute a RESET verb. In addition, DELETE cannot be executed within a public program.

Using the DELETE verb without any parameters clears a program's name so that PGM (-1) returns a null string (" ") and attempting to save a program after using this operation will return an !ERROR=10. An additional note is that unlike using the START verb, the DELETE verb will not clear all variables out of memory, close any files, or reset the string table.

Examples

>DELETE
>DELETE ,9000

See Also

ERASE Verb

Verbs - Alphabetical Listing