zombieZero
Technical User
I searched around but I didn't find anything that quite seemed what I was looking for...this seems like it should be simple but I just can't figure it out;
I have an array and I want to use variables in it:
set ip [getL3Addr]
set name [getName]
set etc [getOther]
array set info {
test1 {$ip $name $etc}
}
...but whenever I query the array, I just get the var names:
puts $info(test1)
{$ip $name $etc}
I can manipulate the variables inside in other ways:
set info(test1) [lreplace $info(test1) 0 0 [getL3Addr]]
...but is there a simpler way? Is there some simple thing that I'm just missing that will allow me to just use the variables inside the array?
I have an array and I want to use variables in it:
set ip [getL3Addr]
set name [getName]
set etc [getOther]
array set info {
test1 {$ip $name $etc}
}
...but whenever I query the array, I just get the var names:
puts $info(test1)
{$ip $name $etc}
I can manipulate the variables inside in other ways:
set info(test1) [lreplace $info(test1) 0 0 [getL3Addr]]
...but is there a simpler way? Is there some simple thing that I'm just missing that will allow me to just use the variables inside the array?