Braces—Deferring Evaluation
Braces are similar to double quotes. Both function as a grouping mechanism; however, braces defer any evaluation of brackets, dollar signs, and backslash sequences. In fact, braces defer everything.
set var1 "a$b[set c]\r"
set var2 {a$b[set c]\r}After evaluation of these two commands, var1 contains an "a" followed by the values of b and c, terminated by a return character. The variable var2 contains the characters "a“, "$“, "b“, "[“, "s“, "e“, "t“, " “, "c“, "]“, "\“, and "r“.
As with double quotes, the braces are not part of the argument they enclose. They just serve to group and defer. The primary use of braces is in writing control commands such as while loops, for loops, and procedures. These commands need to see the strings without having $ substitutions and bracket evaluations made.