Subject: Maxima error when having strings in terms
From: Robert Dodier
Date: Sat, 20 Mar 2010 09:53:01 -0700
On 3/20/10, Oliver Kullmann <O.Kullmann at swansea.ac.uk> wrote:
> (%i1) is("x">0);
> Maxima encountered a Lisp error:
> "x" is not of type LIST.
I agree that this is a bug. However, since a value cannot be assigned to
a string, I don't see how is("x" > 0) could ever be anything other than false.
At present, Maxima is somewhat inconsistent as to whether strings can
represent variables; e.g. "foo" + "foo" => 2*"foo", but ev(%, "foo"=1) =>
"Only symbols can be bound; found: foo". I am inclined to say that
Maxima should steer away from treating strings as variables; one can
use symbols instead, and getting the same treatment for strings as
symbols would be too much trouble for an unclear benefit.
> This seems like a clear bug to me, and hopefully something can be done
> (otherwise our statistics application seem to become very clumsy, always
> having to translate strings into, say, numbers).
Can you use symbols instead of strings? What are you trying to accomplish,
by the way?
best
Robert Dodier