Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0603012e1971eba5cd37ab873b5e4b4f0e93d908
Ticket: 994454ffffffffffffffffffffffffffffffffff
False [info exists] breaks [array anymore]
User & Date: msofer on 2006-10-01 07:10:53
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    From array.n: "Warning: if elements are added to or deleted
    from the array, then all searches are automatically
    terminated just as if array donesearch had been invoked;
    this will cause array nextelement operations to fail for
    those searches."
    
    Now: the problem is that [info exists] calls
    TclVarTraceExists, which sets the "create element" flag.
    Thus, an element is created, and the search is terminated.
    No choice about that: the hash table is changed, the cached
    search data is invalid.
    
    I tried setting that flag to 0: env-5.4 fails. The
    ubiquituous env-array ...
    
    Now, why does [info exists] call read traces? In order to
    process the 'env' array properly for sure; any other reason?
    In any case, changing that can break existing scripts.
    
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"