Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 978a1c9ebf367395a7c699350c1e767c54e89112
Ticket: 1587442fffffffffffffffffffffffffffffffff
let upvar only create variables in the current context
User & Date: kaitzschu on 2006-11-03 19:10:37
Changes

  1. icomment:
    Logged In: YES 
    user_id=966098
    
    So how does one do (centralized namespace variable templating without copying)
    
    set tcnt -1
    foreach ns {ns1 ns2 ns3} {
     for {set cnt 0} {$cnt < 5} {incr cnt} {
      foreach arn {arr lis dic} {
       upvar #0 [namespace current]::$arn[incr tcnt] ::${ns}::$arn$cnt
      }
     }
    }
    
    after this implementation when ns and cnt are variadic? Instead of upvaring these to heavens high one is supposed to
    
    namespace inscope ::$ns upvar [namespace current]::$arn$[incr tcnt] $arn$cnt
    
    or something even remotely resembling? Is this "remotely controlled action at distance" then documented (can I trust these links 
    do exist) or am I simply "doing the wrong thing"?
    
    
  2. login: "kaitzschu"
  3. mimetype: "text/plain"
  4. username: "kaitzschu"