10. Namespaces
The Tcl interpreter collects all commands and global variables into groups called namespaces, so that commands and variables within one namespace don’t interfere with commands in another. These namespaces themselves are arranged in a tree, and commands in one namespace can be imported into another. The root of the tree is the global namespace, and it contains all commands and variables that are not created explicitly within some other namespace.
Commands and variables may be created within or used from out of any existing namespace. This is done by prefixing the name of the namespace to the command or variable name, separated by the namespace separator, a double colon. The name of the global namespace is an empty string, but a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access