DADiSP Worksheet Functions > Function Categories > Display and Manipulation > CLEAR

 

CLEAR

Purpose:

Clears the Window contents and formula.

Syntax:

CLEAR(W1, W2,  ...,  WN)

WN

-

Optional. A range or list of one or more Windows or a variable, macro or function name. Defaults to the current Window.

Example:

clear

clears the current Window.

Example:

clear(W1, W5, W9)

 

clears Windows 1, 5, and 9.

Example:

clear(W3..W8)

 

clears Windows 3 through 8.

Example:

clear W1

 

clears Window 1 using the shorter command form. Only one Window at a time can be cleared using this syntax.

Example:

CLEAR can also delete variables, user defined functions and macros.

 

a = 10

clear a

 

deletes variable a.

Example:

clear myfun

 

removes the SPL function myfun from memory.

Remarks:

A cleared Window propagates throughout the entire Worksheet. If W2 depends on W1 and W1 is cleared, DADiSP will clear the data in W2 and display the symbol ** NA ** (not available) in the center of W2. The Window formula in W2 is not cleared. To prevent losing important Windows, use PROTECT.

 

As shown, CLEAR can also delete variables, user defined functions and macros.

 

See RESETMACROS to delete all user defined macros and restore system macros to their original definitions.

See Also:

CLEARALL

CLEARDATA

CLEAROPL

PROTECT

RESETMACROS

WINLOCK