I am having trouble creating a list of lists that contains a mixture of text and variables in TCL. I have a user input variable that I then want to plug into a list. I will skip the user select option for brevity.
set a 0.1
set b 20.0
set c {
{text1 text2 $a text3}
{text4 text5 $b text6}
}
foreach i $c {
set CheckVal [lindex $i 2]
puts "Threshold is $CheckVal"
}
Resultant output:
Threshold is $a
Threshold is $b
Desired output:
Threshold is 0.1
Threshold is 20.0