Question: scoping rules



On 7/5/08, andre maute <andre.maute at gmx.de> wrote:

> Is the following behaviour intended?

Yes.

>  question: why does func1 change the local variable of func2 ???

Variables in Maxima programs have dynamic scope, not lexical.

Dynamic scope leads to unpleasant surprises, as you've discovered.
We've talked about changing to lexical scope, but we haven't
made any progress on it. But the more often the question is raised,
the sooner we'll get around to it ....

HTH

Robert Dodier