Erasing Variables

To erase variables, tap the "Clear" button and follow the prompts, or use the "clear" command.

The "clear" command is used to erase the definition of any specified variables.  The keyword "all" can be used to erase all variable definitions.

The "clear" command does not work for "lock"ed variables...  A variable must be "unlock"ed for its value to be cleared.

Note:  Since equations automatically solve for their unknowns, some cleared variables might be automatically re-defined immediately!  That behavior guarantees the consistency and validity of all variable definitions.

e.g.    z=2x-7y     Enter a simple equation.
       z=5         Define one of the three unknowns.
       x=9         Define a second unknown. "y" gets evaluated.
       clear x     "x" is cleared, but re-defined automatically!
       clear y z   Clear two of the three variables.
       clear all   Clear all of the evaluated variables.

The Clear Command

Variable definitions persist until redefined or explicitly erased.  To redefine a variable, simply assign it a new value.

> list x

       x = 11

> x=7

x = 7
       x = 7
> list x

       x = 7

To erase the value of one or more variables, use the "clear" command followed by a list of the variables to be undefined.

> w=42

w = 42

       w = 42

> list variables

       x = 7
       y = 3
       e = 2.71828
       w = 42

> clear x y

> list variables

       e = 2.71828
       w = 42

The "clear all" command is a shortcut to erase all variables at once.

> clear all

> list variables

(Note that no output was generated since no variable definitions exist)

Since equations automatically solve for their unknowns, some cleared variables might be automatically re-defined immediately!  That behavior guarantees the consistency and validity of all variable definitions.  This is discussed fully in the "Consistency in Multivariate Equations" section.