[Maxima] Functions may leak information about names(!) of localvariables.
fateman at cs.berkeley.edu
Thu Dec 28 09:02:49 CST 2006
The problem you have encountered is that t is a synonym for the truth value
If you change t to tt inside g(s), uniformly, then the answer you get for
g(t); is 64.
Is this a bug? Perhaps. Lisp uses the variable "t" for true, and this is
how the idea originated. Is this more confusing than useful at this time?
At least in wxmaxima, if you write t[n]:=n^3; it is displayed as
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu [mailto:maxima-
> bounces at math.utexas.edu] On Behalf Of Michel Van den Bergh
> Sent: Thursday, December 28, 2006 5:33 AM
> To: maxima at math.utexas.edu
> Subject: [Maxima] Functions may leak information about names(!) of
> I really don't see how to do robust programming in maxima.
> g(s):=block([t],local(t), t:subvar(s,4), t);
> What is the correct way of dealing with this? Or should one just say that
> arrays are not first class objects and should not be passed around in
> this way?
> That would be a pity.
> Maxima mailing list
> Maxima at math.utexas.edu
More information about the Maxima