Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ralf Fassel Newsgroups: comp.lang.tcl Subject: Re: tcl hidden "cruelties" Date: Fri, 11 Oct 2024 09:51:49 +0200 Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net QHN8wENYcuXJCGKbQmRt4AZ9XRYS0/CtsBh9IWWpzOfhqUNnM= Cancel-Lock: sha1:C18ysZ1z7MIeeUEHiihlSaWARuk= sha1:KJwFzfPJYDtnV1o/HO78pQg0iw8= sha256:zAef7PBxxHH9RW2/ZSNSOx0ApdKkwgYOT4B/VKGOUuc= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Bytes: 1527 * aotto1968 | Regardless of "broken code", TCL itself has some cruelties in its | syntax. Here, for example, the storage of an "array" with a namespace | path, which in TCL always has !! TWO !! commands. ONE command to | generate the namespace and ONE command to finally | generate the array. > | namespace eval ::funcDEF::MkErrN {} | array set ::funcDEF::MkErrN::my { | RETURN_MAPPING {} ---- | var0 mng | } Well, you *could* do it in one step, but you don't have to ;-) namespace eval ::funcDEF::MkErrN { variable my array set my { RETURN_MAPPING {} ... var0 mng } } HTH R'