Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

CLEAR

Resets variables not assigned to a common storage area.

Synopsis

CLEAR

Arguments

The CLEAR statement takes no arguments.

Description

The CLEAR statement clears (sets to 0) all local variables that are not assigned to a common storage area. Variables in a named common storage area or in the unnamed common storage area are unaffected.

Because CLEAR sets to 0 both assigned and unassigned variables, it can be usefully invoked at the beginning of a program to prevent problems caused by unassigned variables.

You can use the COMMON statement to assign variables to a common storage area. You can use the CLEAR COMMON statement to clear (reset to 0) all local variables that are assigned to a named common storage area or to the unnamed common storage area.

See Also