Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a3411fa5a3ba0095648e78c09d323bbc2cd69a69
Ticket: 1274916fffffffffffffffffffffffffffffffff
upvar and qualified varNames
User & Date: msofer on 2005-08-28 19:37:39
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    The problem is that [upvar] has different rules for creative
    writing in the not-fully-qualified case. In the example above
      namespace eval a {upvar x b::x}
    the new variable should refer (in order) to:
    
      (1) ::a::b::x if the namespace ::a::b exists
      (2) ::b::x     if the namespace ::b     exists
    
    Note that this refers to the existence of namespaces; the
    usual resolution rules refer to the existence of the
    variables themselves, ie for [namespace eval a {set b::x 1}]
    the reference is to:
    
      (1) ::a::b::x if the variable ::a::b::x exists
      (2) ::b::x     if the variable ::b::x     exists
      (3) ::a::b::x otherwise (even if ::b exists but ::a::b
    does not)
    
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"