From: SourceForge.net <no...@so...> - 2003-03-02 00:00:32
|
Bugs item #488882, was opened at 2001-12-04 05:45 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=488882&group_id=10894 Category: 08. Environment Variables Group: = 8.3 >Status: Open >Resolution: Remind Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Mo DeJong (mdejong) Summary: problem with [info exists env(*)] Initial Comment: 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 (Arn...@po...) ---------------------------------------------------------------------- >Comment By: Jeffrey Hobbs (hobbs) Date: 2003-03-01 16:10 Message: Logged In: YES user_id=72656 I believe that Mo actually wanted to look into masking this behavior, rather than reflecting the MS behavior. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2003-02-25 01:22 Message: 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. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-12-13 00:48 Message: 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 ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2001-12-12 12:27 Message: 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. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2001-12-04 08:12 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=488882&group_id=10894 |