Section: Inspection Functions
clear a1 a2 ...
The variables can be persistent or global, and they will be deleted. The second form
clear 'all'
clears all variables and libraries from the current context. Alternately, you can use the form:
clear 'libs'
which will unload any libraries or DLLs that have been import
ed.
Optionally, you can specify that persistent variables should be cleared via:
clear 'persistent'
and similarly for global variables:
clear 'global'
You can use
clear 'classes'
to clear all definitions of user-defined classes.
With no arguments, clear
defaults to clearing 'all'
.
clear
to delete a variable. First, we create a variable called a
:
--> a = 53 a = 53 --> quit
Next, we clear a
using the clear
function, and verify that it is deleted.
--> clear a --> a Error: Undefined function or variable a --> quit