For the record, my comments on this problem 2008-02-21:
Well, the mechanism for saving and restoring local variables handles only simple variables (not
subscripted variables). ev substitutes for subscripted variables instead. But substitution doesn't have quite the same effect, as you have observed. See $EV in src/mlisp.lisp.
This is a bug; I guess it could be fixed by making MBIND and friends happy with subscripted variables. Dunno if that would cause trouble elsewhere.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Isn't this "behavior by design"? I note that ev(f(l,m),A[l,m]=0,eval) works fine, which seems to be in line with my understanding of how ev() is supposed to function, but perhaps I misunderstood the intended behavior.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=588346
Originator: NO
Thanks for the bug report. EV is a very funny function, and often produces peculiar surprises like this.
I hope we'll be able to fix this at some point, but in the meantime, I'd suggest you use subst to evaluate things like this:
subst([a[l,m]=0],f(l,m))
instead of ev.
Logged In: YES
user_id=501686
Originator: NO
For the record, my comments on this problem 2008-02-21:
Well, the mechanism for saving and restoring local variables handles only simple variables (not
subscripted variables). ev substitutes for subscripted variables instead. But substitution doesn't have quite the same effect, as you have observed. See $EV in src/mlisp.lisp.
This is a bug; I guess it could be fixed by making MBIND and friends happy with subscripted variables. Dunno if that would cause trouble elsewhere.
Isn't this "behavior by design"? I note that ev(f(l,m),A[l,m]=0,eval) works fine, which seems to be in line with my understanding of how ev() is supposed to function, but perhaps I misunderstood the intended behavior.