The question is about TCL Arrays.
In my TCL script,
variable1 is a variable value obtained from other functions(value is something like PATH_xyz.)
variable2 is another variable obtained from other calculations, whose value is something like {3.5400 7.3200}.
I want to:
set ${variable1}(modifyPt) {variable2}
puts ${variable1}(modifyPt)
How to do it correctly?
I tried
set ${variable1}(modifyPt) $variable2
output>>>: 4379.2160 13892.8270
puts ${variable1}(modifyPt)
output>>>: PATH_62_5474(modifyPt)
(PATH_62_5474 was stored in variable1 at that point of execution)
I was expecting value of PATH_62_5474(modifyPt), i.e., 4379.2160 13892.8270 at the second output above. also I tried
puts ${${xysp}(modifyPt)}
output>>>: Error: can't read "${variable1": no such variable