A part of my code in tcl is:
proc Frame {columnLine} {
.
.
.
}
Now I want use $variable in parenthesis. For example:
set x 2.
set columnLine {$x 5. 10. 15.}
However, after running Tcl, I face an error! How I do solve this problem?
A part of my code in tcl is:
proc Frame {columnLine} {
.
.
.
}
Now I want use $variable in parenthesis. For example:
set x 2.
set columnLine {$x 5. 10. 15.}
However, after running Tcl, I face an error! How I do solve this problem?
Tcl does not do substitutions on things inside
{braces}. If you want substitutions, you've got to either put the overall word inside"double quotes", or use thesubstcommand:One advantage of using
substis that you can pick to just substitute variables and leave backslashes and[bracketed command calls]alone. This is sometimes very useful indeed.