You can access any namespace if you have the "key":
At a moment with access to the namespace, just create a reference to the namespace and use it as the key.
Important:
If you store the key in the Here namespace, it's not accessible from outside.
To make it accessible from everywhere, just store it in the global namespace.
-> global "polluted" by one key variable - not by ~ 80 variables anymore : )
JMP will handle the anonymous namespace and delete it once it's not needed anymore.
Names Default To Here(1);
Delete Symbols();
// Declare a variable in the outer "Here" scope
x = "Variable";
//myHere = Namespace("here"); // created inside HERE -> not accessible from local here
::myHere= Namespace("here"); // so let's create the reference in the global NS
z=5;
Local Here(
:: mylocalHere= Namespace("here"); // will be deleted after local HERE
// the same for "myHere": it will be deleted once the code is finished AND the editor is closed -> very convenient
::mypersistentNamespace = New Namespace("persistent"); // manually created -> persistent
persistent:y="still alive";
// Access the outer "Here" scope variable via the namespace reference
y = Eval(::myHere << Get value ("z"));
Show(y);
);
Show(:: mylocalHere); // deleted
Show(::mypersistentNamespace) // alive