| Deutsch English Français Italiano |
|
<vtbiab$24pkk$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: aotto1968 <aotto1968@t-online.de>
Newsgroups: comp.lang.tcl
Subject: Re: A TclOO question (for experts?)
Date: Fri, 11 Apr 2025 19:08:27 +0200
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <vtbiab$24pkk$1@dont-email.me>
References: <viv7vj9q15o35mv2obt3gutmftelnpj2ck@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 11 Apr 2025 19:08:28 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="911676cc4340390ab7fb85bda6b2d36d";
logging-data="2254484"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3drjo6XwW3G2BELzcSeeWwbkCRjk8EVA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:d+Nkj8i0j/BcKYPQSimcAfKbnuI=
Content-Language: en-US
In-Reply-To: <viv7vj9q15o35mv2obt3gutmftelnpj2ck@4ax.com>
Bytes: 2285
On 07.04.25 18:34, Helmut Giese wrote:
> Hello out there,
> look at the following sample:
> ---
> catch {Sample destroy}
>
> oo::class create Sample {
> variable classVar ;# automatically exists in every instance
> constructor {someVar} {
> my variable objVar
> set classVar $someVar
> set objVar 99
> }
> destructor {
> my variable objVar classVar
> puts "classVar: $classVar, objVar: $objVar"
> }
> }
>
> Sample create s1 100
> Sample create s2 200
> s1 destroy ;# -> classVar: 100, objVar: 99
> s2 destroy ;# -> classVar: 200, objVar: 99
> ---
> My question is: What happens, if I add 'classVar', although not
> needed, to a 'my variable' statement - like I did in the destructor
> above. Is it just superfluous or can it have consequences in a more
> complex situation than the above example.
> Thank you for any enlightenment
> Helmut
a very good source for all kind of programming questions is the KI
for example the GROK from X(twitter)
→ https://x.com/i/grok
it is really impressive, here is your answer:
→ https://x.com/i/grok/share/Wo4XKUycnscf3WNTbpMoms93f
mfg