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

CLEARCOM (CLEARCOMMON)

Resets variables assigned to a common storage area.

Synopsis

CLEARCOM [/store/] 
CLEARCOMMON [/store/] 
CLEAR COM [/store/] 
CLEAR COMMON [/store/]

Arguments

store Optional — A named common storage area for a group of variables. If specified, this name is enclosed with slashes (/). The default is the unnamed common area.

Description

The CLEARCOMMON statement resets all of the variables stored in the common storage area, assigning them the value “0”. The COMMON statement allows you to assign a list of local variables to a common storage area. These variables do not have to be defined to be listed in a common storage area.

The COMMON statement can define a store name for a named common storage area. If COMMON omits store, the named variables are stored in the unnamed common storage area. CLEARCOMMON can reset the variables in a named common storage area, or omit store and reset the variables in the unnamed common storage area.

CLEARCOM, CLEARCOMMON, CLEAR COM, and CLEAR COMMON are all equivalent syntactical forms for this statement.

You can use the CLEAR statement to clear (reset to 0) all local variables that are not assigned to a common storage area.

See Also