CLEAR Verb

Syntax

CLEAR {{EXCEPT} varlist}

Description

The CLEAR verb is a reset/initialize verb that first performs a RESET and clears the current user data. When used without parameters, the CLEAR verb performs a RESET and clears the current user data. When used with parameters, the verb clears one or more variables, including arrays.

Parameter

Description

EXCEPT

List of variables that are not to be cleared. It should be comprised of simple variables. ARRAY[ALL] and ARRAY$[ALL] are permitted to prevent an array from being cleared.

varlist

List of variables to be cleared. When CLEAR is used with just a variable, then only that variable is cleared from memory.

See the RESET verb for additional information on the levels of reset verbs.

Executing a CLEAR after an ENTER has the following effect on arguments passed through the ENTER:

Examples

Example 1

The following illustrates the use of CLEAR in console mode:

CLEAR

Example 2

The following illustrates a simple CLEAR statement:

0100 CLEAR

Example 3

The following illustrates a CLEAR statement using the EXCEPT clause to exclude certain variables from the CLEAR:

0100 CLEAR EXCEPT TOTAL,PAGE_NUM,DATE$,J[ALL]