|
From: Barton W. <wi...@un...> - 2024-07-12 09:21:57
|
Try using subvarp; for example
(%i3) subvarp(a[b]);
(%o3) true
(%i4) subvarp(a(b));
(%o4) false
The user documentation:
Function: subvarp (expr)
Returns true if
expr
is a subscripted variable, for example a[i].
--Barton
________________________________
From: Eduardo Ochs <edu...@gm...>
Sent: Friday, July 12, 2024 02:12
To: <max...@li...> <max...@li...>
Subject: [Maxima-discuss] a(b), a[b], op, args
Caution: Non-NU Email
Hi list,
"op" and "args" don't distinguish between a(b) and a[b]:
(%i1) [o:a(b),op(o),args(o)];
(%o1) [a(b), a, [b]]
(%i2) [o:a[b],op(o),args(o)];
(%o2) [a , a, [b]]
b
(%i3)
what do I need to use to distinguish them?
Why I'm asking: there are several kinds of expressions that this
program - <http://anggtwu.net/eev-maxima.html#luatree> - doesn't
handle well... I'm trying to fix it.
Thanks in advance!
Eduardo =)
|