On Fri, Jun 27, 2008 at 10:33 AM, Mario Rodriguez
<biomates at telefonica.net> wrote:
> (%i1) load(vect)$
> (%i2) ev(express(grad(x+y+z)),diff);
> (%o2) [1, 1, 1]
> (%i3) gradient(p):=ev(express(grad(p)),diff);
> (%o3) grad ient(p) := ev(express(grad p), diff)
Maxima's parser is greedy --- foobar is parsed into "foo"(bar) when "foo"
is a prefix operator. (Try :lisp $% to see what gradient(p):= ... was
parsed into.) Backslash defeats recognition of operators ---
try \gradient instead. (Likewise a\+b is a symbol, not an expression.)
> This problem is new, in older versions this definition worked fine.
I don't see how it could have worked before; the parser has always
been greedy. I tried the above example w/ some old versions
(oldest = 5.9.2) and got the same behavior. Maybe different Lisps
behave differently; if so, that's a bug, the Maxima parser should be
greedy in all Lisps.
HTH
Robert Dodier