Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 724f6d309543b5318225951784faffda324d3cf9
Ticket: 1274918fffffffffffffffffffffffffffffffff
doc: upvar and qualified varNames
User & Date: msofer on 2005-08-28 01:36:47
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    This supersedes Bug #959831.
    
    There are two (related, important) issues that the
    [upvar] docs do not describe: what it does when called
    outside a proc body, and how it handles qualified
    variable names.
    
    The behaviour outside of proc bodies just needs
    documenting: 
       upvar ?level? otherVar myVar ?otherVar myVar ...?
    will create a variable named myVar in the current
    namespace (assuming for now that myVar is not
    qualified) linked to the variable otherVar as resolved
    in the corresponding stack frame. This is the same
    behaviour as documented in upvar.c, just replacing
    "current procedure" by "current context". The fact that
    this variable can never be unset until the namespace is
    deleted deserves mention - and maybe a fix too?
    
    The behaviour when otherVar is qualified is completely
    unspecified in the manual page. This may not be a
    problem, the behaviour is without surprises: the
    variable that is linked to is otherVar as resolved in
    the corresponding stack frame.
    
    The behaviour when myVar is qualified is also
    unspecified in the manual page, and is currently buggy
    (Bug #1274916).
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "07. Variables"
  10. title changed to: "doc: upvar and qualified varNames"
  11. type changed to: "Bug"