Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 920d48462d9ff48a4b6707ddb149021c667df563
Ticket: 488882ffffffffffffffffffffffffffffffffff
problem with [info exists env(*)]
User & Date: nobody on 2001-12-04 13:45:47
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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])
    
    
  4. foundin changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "17. Commands I-L"
  10. title changed to: "problem with "info exists env(*)""
  11. type changed to: "Bug"