Command: namespace namespace children
[namespace] [pattern]}
Returns list of child namespaces belonging to namespace (defaults
to current) which match pattern (default *).
namespace codescript}
Returns new script string which when evaluated arranges for script to
be evaluated in current namespace. Useful for callbacks.
namespace current
}
Returns fully-qualified name of current namespace.
namespace delete
[namespace ...]}
Each given namespace is deleted along with their child namespaces,
procedures, and variables.
namespace evalnamespacearg [arg ...]}
Activates namespace and evaluates concatenation of args`s inside it.
namespace export [-clear]
[pattern ...]}
Adds to export list of current namespace all commands that match given
pattern`s. If -clear
is given, the export list is first
emptied.
namespace forget
[namespace::pattern ...]}
Removes from current namespace any previously imported commands from
namespace that match pattern.
namespace import [-force]
[namespace::pattern ...]}
Imports into current namespace commands matching pattern from namespace.
The -force
option allows replacing of existing commands.
namespace inscopenamespacelistArg [arg ...]}
Activates namespace (which must already exist) and evaluates inside
it the result of lappend of arg`s to listArg.
namespace origincommand}
Returns fully-qualified name of imported command.
namespace parent
[namespace]}
Returns fully-qualified name of parent namespace of namespace.
namespace qualifiersstring}
Returns any leading namespace qualifiers in string.
namespace tailstring}
Returns the simple name (strips namespace qualifiers) in string.
namespace which [-command|-variable]name}
Returns fully-qualified name of the command (or as variable,
if -variable
given) name in the current namespace.
Will look in global namespace if not in current namespace.
variable
[namevalue ...] name [value]}
Command: variable
Creates one or more variables in current namespace (if
name is unqualified) initialized to optionally given values.
Inside a procedure and outsize a namespace eval
, a
local variable is created linked to the given namespace variable.