You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When using Module, if we have local variables in the returned expression, they are always the same. It seems that Module doesn't create new local variable names each time as it is supposed to. e.g.
symata 1> g(a, b) Out(1) = h(a,##c#360)*h(##c#360,b)
symata 2> g(a, b) * g(d, e) Out(2) = h(a,##c#360)*h(d,##c#360)*h(##c#360,b)*h(##c#360,e)
As you can see, the dummy variable c is always replaced by ##c#360 instead of, for example, ##c#360 from calling g(a,b) and ##c#361 from calling g(d,e).
Is this a bug or did I misunderstand something?
p.s. I don't know how to use the name ##c#360 in the following calculation, it seems I have to somehow escape the # but I haven't figured out the correct way...
The text was updated successfully, but these errors were encountered:
p.s. I don't know how to use the name ##c#360 in the following calculation, it seems I have to somehow escape the # but I haven't figured out the correct way...
This problem is fixed in #164. But, the more serious problem will take more work.
Hi,
When using Module, if we have local variables in the returned expression, they are always the same. It seems that Module doesn't create new local variable names each time as it is supposed to. e.g.
symata 1> g(a_, b_) := Module([c], h(a, c) * h(c, b))
symata 1> g(a, b)
Out(1) = h(a,##c#360)*h(##c#360,b)
symata 2> g(a, b) * g(d, e)
Out(2) = h(a,##c#360)*h(d,##c#360)*h(##c#360,b)*h(##c#360,e)
As you can see, the dummy variable c is always replaced by ##c#360 instead of, for example, ##c#360 from calling g(a,b) and ##c#361 from calling g(d,e).
Is this a bug or did I misunderstand something?
p.s. I don't know how to use the name ##c#360 in the following calculation, it seems I have to somehow escape the # but I haven't figured out the correct way...
The text was updated successfully, but these errors were encountered: