Deleting Variables

 

The DELVARIABLE function (abbreviated delvar) deletes a global variable from the current session. For example:

 

myvar = integ(w1)

 

delvariable(myvar)

 

creates and deletes variable myvar.

 

DELALLVARIABLES deletes all global variables in the session.

 

CLEAR deletes a function, variable or Window:

 

clear(myvar)

 

Is equivalent to:

 

delvariable(myvar)

 

When used directly from the command line, clear can be specified in the more convenient "command" form:

 

clear myvar

 

In fact, any expression of the form:

 

function("string")

 

Can be entered as

 

function string

 

However, the command form is only accepted at the command line, it is not recognized within SPL functions. Note: the " " are optional for variable names.