| Deutsch English Français Italiano |
|
<ygabjzrf562.fsf@akutech.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Ralf Fassel <ralfixx@gmx.de>
Newsgroups: comp.lang.tcl
Subject: Re: tcl hidden "cruelties"
Date: Fri, 11 Oct 2024 09:51:49 +0200
Lines: 27
Message-ID: <ygabjzrf562.fsf@akutech.de>
References: <ve89ok$345h7$1@dont-email.me>
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)
* aotto1968 <aotto1968@t-online.de>
| 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 {}
--<snip-snip>--
| 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'