I want to write a Package with a function in it.
fun[]:=
(DynamicModule[{},(a=10;a)]) .
This works fine,but when i call it twice, they are related to each other.
how do i localize the values?
|
|
|||
|
|
closed as too localized by Ajasja, Artes, Mr.Wizard♦ Jan 19 at 8:19
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
|
I recommend reading the help pages in the documentation center of Mathematica on
If you now call For your example, you have to put a into the curly brackets. Otherwise it will be globally accessible:
Now a is a local variable inside the |
||||
|
|
