next up previous contents
Next: EXIST Text Existence of Up: Inspection Functions Previous: Inspection Functions   Contents

Subsections

CLEAR Clear or Delete a Variable

Usage

Clears a set of variables from the current context, or alternately, delete all variables defined in the current context. There are two formats for the function call. The first is the explicit form in which a list of variables are provided:

   clear a1 a2 ...

The variables can be persistent or global, and they will be deleted. The second form

   clear 'all'

clears all variables from the current context.

Example

Here is a simple example of using clear to delete a variable. First, we create a variable called a:

--> a = 53
a = 
  <int32>  - size: [1 1]
            53

Next, we clear a using the clear function, and verify that it is deleted.

--> clear a
--> a
Error: Undefined function or variable a
   at <Interactive>



2004-08-26