Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fa62c95c096d9f5ad7f56ff7ec0899fb340233a5
Ticket: 3599017fffffffffffffffffffffffffffffffff
trace that unsets and then sets and array
User & Date: pooryorick on 2012-12-31 16:19:07
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    In the following example, the asnwer to [info exists ::var1] is "1", but the answer to [info exists var2(1)] is "0".  Is this not inconsistent?
    
    set ::var1 [list 1 v1]
    trace add variable ::var1 {read} ::trace1
    proc trace1 { args } {
    unset ::var1
    set ::var1 [list 1 v1]
    }
    puts [info exists ::var1]
    
    array set ::var2 [list 1 v1]
    trace add variable ::var2 {read} ::trace2
    proc trace2 { args } {
    array unset ::var2
    array set ::var2 [list 1 v1]
    }
    
    puts [info exists ::var2(1)]
    
    
    
    
  4. foundin changed to: "current: 8.6.0"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "pooryorick"
  10. subsystem changed to: "46. Traces"
  11. title changed to: "trace that unsets and then sets and array"
  12. type changed to: "Bug"