Sujet : Re: Are class consts possible?
De : m.n.summerfield (at) *nospam* gmail.com (Mark Summerfield)
Groupes : comp.lang.tclDate : 20. Jun 2025, 20:45:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1034dnv$7fls$1@dont-email.me>
References : 1 2
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Fri, 20 Jun 2025 13:28:13 -0000 (UTC), Rich wrote:
Mark Summerfield <m.n.summerfield@gmail.com> wrote:
Is it possible to create class-specific consts i.e., consts that exist
inside a class's namespace?
Tcl does not have "constants" in the vien of other languages
"constants".
However, there are several ways to "roll your own":
https://wiki.tcl-lang.org/page/constants
According to
https://www.tcl-lang.org/man/tcl9.0/TclCmd/const.html"const — create and initialize a constant"
And I use them quite a lot since I'm using Tcl 9.
Perhaps the wiki needs updating?