namespace current
Gives the full name of the current namespace.
namespace current
Description
Gives the full name of the namespace where the code runs: :: at the global scope, the namespace of namespace eval, or the namespace of a proc while its body runs.
Returns
A full namespace name, such as :: or ::a::b.
Examples
% namespace current
::
% namespace eval a {namespace current}
::a
% namespace eval a {proc where {} {namespace current}}
> a::where
::a
Errors
% namespace current x
wrong # args: should be "namespace current"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1