I'm trying to make sense out of the "array get" output:
This is my array:
portHandleArray(0): 1
portHandleArray(1): 2
portHandleArray(2): 3
portHandleArray(3): 4
portHandleArray(4): 11
portHandleArray(5): 12
portHandleArray(6): 13
portHandleArray(7): 14
tclsh>array get portHandleArray
4 11 0 1 5 12 1 2 6 13 2 3 7 14 3 4
I guess I would have assumed that the output would look like the following:
0 1 1 2 2 3 3 4 4 11 5 12 6 13 7 14
where each odd numbered element is the index, and the even is the value. Can someone explain why I am seeing the output I am seeing?
TIA
This is my array:
portHandleArray(0): 1
portHandleArray(1): 2
portHandleArray(2): 3
portHandleArray(3): 4
portHandleArray(4): 11
portHandleArray(5): 12
portHandleArray(6): 13
portHandleArray(7): 14
tclsh>array get portHandleArray
4 11 0 1 5 12 1 2 6 13 2 3 7 14 3 4
I guess I would have assumed that the output would look like the following:
0 1 1 2 2 3 3 4 4 11 5 12 6 13 7 14
where each odd numbered element is the index, and the even is the value. Can someone explain why I am seeing the output I am seeing?
TIA