Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2c8dcee00677bc211fb8e97f2f76fe48d6f4948d
Ticket: 1749596fffffffffffffffffffffffffffffffff
upvar and unset and traces: change in HEAD correct?
User & Date: msofer on 2007-07-07 13:45:29
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    mig@uh:~$ tclsh8.4
    % upvar 0 a(x) y
    % proc moo args {trace add variable ::a(x) unset moo; set ::y 1}
    % moo
    1
    % unset a
    % parray a
    % set y
    can't read "y": no such variable
    % set y 1
    can't set "y": upvar refers to element in deleted array
    
    versus
     
    mig@uh:~$ /home/CVS/tcl_SF_clean/unix/tclsh
    % upvar 0 a(x) y
    % proc moo args {trace add variable ::a(x) unset moo; set ::y 1}
    % moo
    1
    % set y
    1
    % parray a
    a(x) = 1
    
    What this means is that upvar in HEAD has snapshot semantics that are "less pure" than 8.4
    
  4. foundin changed to: "obsolete: 8.5a7"
  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: "msofer"
  10. subsystem changed to: "07. Variables"
  11. title changed to:
    upvar and unset and traces: change in HEAD correct?
    
  12. type changed to: "Bug"