How do you find the name of the current namespace

57 Views Asked by At

I have been reading a lot about namespaces and there is one thing I cannot figure out. How do you get the name of the current namespace in Dyalog APL, similar to "pwd" in linux?

I would like to get the current NS programmatically in a function and on the command line.

1

There are 1 best solutions below

1
Adám On BEST ANSWER

⎕THIS

That said, it actually returns a reference to the current namespace. If you want the name in text form, then use ⍕⎕THIS, but note that a namespace can be unnamed, in which case you might get something useless like '#.[Namespace]'.