tcl - Understanding the usage of braces -
I am learning TCL / TAC and am confused with the use of curly braces in TCL.
It is being used to indicate the scope and declare the string for me. Is this a bug (or feature)?
Is my interpretation correct?
In short,
- TCL's braces have single coats of sh Work like - group term (and lines) without launch
- Dual quotes of TCL act as double quote marks - permission for launch.
The fact that you are not mandatory to use curly braces in the definition of proc
is a convenient way to pass a script as a logic without interpolation. Arguments to
These are identical
proc add3 {abc} {return [expr {$ a + $ B + $ c}]}
< P> proc add3_weird [list ABC] "return \ [expr {\ set a] + \ [set b] + \ [set c]}]" < / Pre> Once you quote TCL, you will realize how flexible TCL can actually be.
Comments
Post a Comment