Maxima help: clear variable



Agreed that Maxima (like many names chosen before search engines) is not
great for searching.  But a search like [maxima cas clear variable] in fact
finds the information you're looking for.

There is no standard for the operation of making a variable undefined.
Common Lisp calls it makunbound; Mathematica and Maple call it clear;
Python calls it del; csh has unsetenv for environment variables; etc. So it
shouldn't be surprising that Maxima has a different name.

kill(symbol) kills the value, array, function definition, and properties of
symbol (except, alas, for assumptions like assume(var>3))

remvalue(symbol) kills only the value and not any of the other properties

Another possibility is simply to assign  a: 'a$

You might also want to try kill(all) if you want to delete all variables
and functions. Careful: this does not completely reset the environment to
its initial state.

                  -s


On Mon, Dec 23, 2013 at 11:46 AM, qbsmd <qbsmd at hotmail.com> wrote:

> I've been trying to find this in a Maxima manual, but that program has the
> worst possible name for trying to search for information (please, please
> change the name to something that doesn't return results for Nissan
> vehicles and MATLAB, Octave, and Mathematica sites talking about local and
> global maxima).
>
> After setting a variable to something, e.g.
> a:2;
> how do you clear that value? E.g., I would expect
> clear(a);
> a;
> to return "a".
> Currently, I have to close and reopen the program and rerun every command
> any time I need to do this.
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>