I've got a recursive proc with code that access a global associative array. There are many associative arrays using the naming convention Node1, Node2, Node 3 etc...
Because the name has to be dynamically generated
upvar 0 Node[expr $node_nr] MyLocalNode
set thistest $MyLocalNode(NodeID)
I've also tried using the global command like this:
global Node[expr $node_nr]
set thistest ${MyLocalNode}(NodeID)
I've been stuck on this for almost two days. I'm ready to trash this idea and try something completely different. I'd rather not.
More info:
set thistest $Node1(NodeID) works fine
set Node[expr $node_nr](NodeID) 12345 works fine
I think this all revolves around tcls "one pass" elvaluation
Is this possible?
Any help would be GREATLY appreciated.
Because the name has to be dynamically generated
upvar 0 Node[expr $node_nr] MyLocalNode
set thistest $MyLocalNode(NodeID)
I've also tried using the global command like this:
global Node[expr $node_nr]
set thistest ${MyLocalNode}(NodeID)
I've been stuck on this for almost two days. I'm ready to trash this idea and try something completely different. I'd rather not.
More info:
set thistest $Node1(NodeID) works fine
set Node[expr $node_nr](NodeID) 12345 works fine
I think this all revolves around tcls "one pass" elvaluation
Is this possible?
Any help would be GREATLY appreciated.