namespace
Creates and manages namespaces for organizing commands and variables.
Syntax
tcl
namespace subcommand ?arg ...?Subcommands
namespace eval
Evaluate a script in the context of a namespace, creating it if necessary.
tcl
namespace eval ns scriptnamespace current
Returns the fully-qualified name of the current namespace.
tcl
namespace currentnamespace delete
Deletes one or more namespaces and their contents.
tcl
namespace delete ?ns ...?namespace exists
Returns 1 if the namespace exists, 0 otherwise.
tcl
namespace exists nsnamespace children
Returns a list of child namespaces.
tcl
namespace children ?ns? ?pattern?namespace parent
Returns the parent namespace of a namespace.
tcl
namespace parent ?ns?namespace qualifiers
Extracts the namespace portion from a qualified name.
tcl
namespace qualifiers stringnamespace tail
Extracts the tail (command name) from a qualified name.
tcl
namespace tail stringExamples
Output
Output
Output
Output
Output
Output
Output
