remvalue, was: Strange plot2d behaviour (correction)



Dear Richard,

This has now been beaten to dead. Try

 h(s, t) := ev(subvar(s, t), eval);

 h(t[4],1);

Answer:
t evaluates to 1
Improper name or value in functional position.
#0: h(s=t[4],t=1)
 -- an error.  To debug this try debugmode(true);

The following is a mechanical fix
h(s, t) := block([s__, t__], s__ : s, t__ : t, remvalue(s, t),
                                                    ev(subvar(s__, t__),
eval))

h(t[4],1);

(t_4)_1

Of course I assume that the user will not use the variables s__, t__. 
s__, t__
should really be unique. If you can give me a (generic!) solution with
?gensum()
I will be happy to learn it.

But the fact remains is that I don't see why maxima interpreter cannot
do this for us.
In my opininion parameters are parameters and local variables are local
variables. There should
be ***no*** side effects  ***at all***.

Michel

>