delete(n)
β¨ NAME β¨
itcl::delete β bestie, this is the command that deletes things in the interpreter π
π¦ SYNOPSIS π¦
itcl::delete option ?arg arg ...?
πΈ DESCRIPTION πΈ
Okay so delete is the command you use to delete things in the interpreter, no cap. The way that it works is it's implemented as an ensemble, which means extensions can add their own options and extend the behavior of this command. By default though, delete handles the destruction of namespaces. That's its whole main character job.
The option argument is what decides which action the command actually carries out. The legal options β and yes, they may be abbreviated, so you can be lazy, we support that β are:
delete class name ?name...?β deletes one or more [incr Tcl] classes called name. This nukes all objects in the class, and all derived classes as well. Like, the whole family tree, gone π
If an error is encountered while destructing an object, it will prevent the destruction of the class and any remaining objects. So if you want to destroy the entire class without regard for errors, use the delete namespace command instead. Periodt.
delete object name ?name...?β deletes one or more [incr Tcl] objects called name. An object gets deleted by invoking all destructors in its class hierarchy, in order from most- to least-specific. If all the destructors are successful, the data associated with the object is deleted and the name is removed as a command from the interpreter. Clean exit, slay β¨
If the access command for an object resides in another namespace, then its qualified name can be used:
itcl::delete object foo::bar::x
If an error is encountered while destructing an object, thedeletecommand is aborted and the object remains alive π. To destroy an object without regard for errors, use therenamecommand to destroy the object access command. Different tool, different vibe.
delete namespace name ?name...?β deletes one or more namespaces called name. This deletes all commands and variables in the namespace, and deletes all child namespaces as well β yes, the children too, it's giving generational. When a namespace is deleted, it is automatically removed from the import lists of all other namespaces. So tidy, so iconic π
π KEYWORDS π
namespace, proc, variable, ensemble
okay bestie that's the whole page π«Ά go forth and delete responsibly (or recklessly, i'm not your mom). this was itcl version 3.0, the delete(n) page, brought to you with love and also a lil bit of chaos ππβ¨
π¦ where this page comes from
- alpine 3.22: tcl-doc 8.6.16-r0 Β· TCL
- alpine 3.23: tcl-doc 8.6.17-r0 Β· TCL
- alpine 3.23: tcl9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tcl-doc 8.6.17-r1 Β· TCL
- alpine 3.24: tcl9-doc 9.0.3-r2 Β· TCL
- arch rolling: tcl 8.6.16-1 Β· TCL
- fedora 43: itcl 4.3.2-1.fc43 Β· TCL
- fedora 43: itcl 4.3.2-2.fc43 Β· TCL
- fedora 44: itcl 4.3.2-3.fc44 Β· TCL
- nixos 26.05: tcl 9.0.3
- nixpkgs unstable: incrtcl 4.2.3
- nixpkgs unstable: tcl 9.1.0
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- Copyright (c) 1993-1998 Lucent Technologies, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms