I want to create an array of array, to get this kind of values:
test_array(first_channel)(0) = users
test_array(first_channel)(1) = voices
test_array(first_channel)(2) = halfs
test_array(first_channel)(3) = opers
test_array(second_channel)(0) = users
test_array(second_channel)(1) = voices
test_array(second_channel)(2) = halfs
test_array(second_channel)(3) = opers
but first_channel, second_channel are variables coming from [channels]
So, I make:
Code: Select all
foreach my_chan [channels] {
set test_array([string tolower $my_chan]) { "0" "0" "0" "0"}
}
....
proc fillin {channel} {
global test_array
set test_array((${channel})(0) "x"
set test_array((${channel})(1) "y"
....
putlog "$test_array((${channel})(0) -- $test_array((${channel})(1)"
}