Artifacts Associated With Ticket 488882
Ticket change [920d48462d] (rid 120718) by nobody on 2001-12-04 13:45:47:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi all, I noticed a problem using "info exists" with the env (Environment Variable) array. I used Active State Tcl 8.3.3 and 8.3.4 and my OS is Windows 2000 (SP 5). Here is my Tcl-script: % set env(A) A A % puts $env(A) A % set env(A) "" % puts $env(A) can't read "env(A)": no such variable <-- Here it seems that env(A) does NOT exist ... % info exists env(A) 1 <-- ... but "info exist" knows something about env(A) .... % array name env A % info exists env(A) 0 <-- ... but here it is away again!? I found some Bug reports from older releases (217835, 218754) regarding this problem. But they are cosed (long time ago). Here is an output from Tcl 8.0.5 which looks fine (in my opinion): % set env(A) A A % puts $env(A) A % set env(A) "" % puts $env(A) % info exists env(A) 1 % array name env A A % info exists env(A) 1 Thanks and regards Arne ([email protected])
- foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "problem with "info exists env(*)""
- type initialized to: "Bug"
Ticket change [894c44fb59] (rid 132003) by dkf on 2001-12-04 23:12:49:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=79902 I believe this is because Microsoft (in their infinite wisdom) define an empty environment variable to be non-existant.
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "08. Environment Variables"
- title changed to: "problem with "info exists env(*)""
- username: "dkf"
Ticket change [8ee1a19752] (rid 120192) by hobbs on 2001-12-13 03:27:30:
- icomment:
Logged In: YES user_id=72656 dkf is correct, the problem is that env variables that are set to "" will be removed. You can find this behavior repeated in the Windows DOS console. This is a dup of 219209, but this behavior should be fixed such that Tcl masks this Windows oddity.
- login: "hobbs"
- mimetype: "text/plain"
- title changed to: "problem with "info exists env(*)""
- username: "hobbs"
- icomment:
Ticket change [8145bf6d0d] (rid 116999) by nobody on 2001-12-13 15:48:37:
- icomment:
Logged In: NO Thanks for the response, and for your help! There is only one question open(;-)) Tcl 8.0.5 does not have this problem. What has changed (in Tcl 8.3.4)? Thanks again, and kind regards Arne
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [1b478e69ec] (rid 123120) by dkf on 2003-02-25 16:22:09:
- closedate changed to: "2003-02-25T09:22:09"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 What changed was that we decided we considered accurate mirroring of the process's environment variables to be preferable to precise cross-platform compatability.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"
- title changed to: "problem with [info exists env(*)]"
- username: "dkf"
Ticket change [b1910fa4d2] (rid 98169) by hobbs on 2003-03-02 07:10:20:
- assignee changed to: "mdejong"
- icomment:
Logged In: YES user_id=72656 I believe that Mo actually wanted to look into masking this behavior, rather than reflecting the MS behavior.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- status changed to: "Open"
- username: "hobbs"
Ticket change [7fded82338] (rid 97634) by mdejong on 2003-03-12 07:41:59:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=90858 I gave up on the masking thing. It seems like this would be a good idea, but I seemed to reember being talked out of it. Punting.
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
Ticket change [111752f1df] (rid 95081) by jaspert on 2005-07-12 14:57:58:
- icomment:
Logged In: YES user_id=456242 This problem still exists in 8.4.9.1 and WinXP...surely it's a bug, since 'info exists env(foo)' should always tell you whether or not 'puts $env(foo)' is going to raise an exception? Either the variable exists, or it doesn't.
- login: "jaspert"
- mimetype: "text/plain"
- username: "jaspert"
- icomment: