next up previous index
Next: Data Up: Interpretation Principles Previous: Quoting with Double

Quoting with Braces

Braces group a list of words together into one value, but unlike double quotes, they disable all substitutions and quotes, so that all words in the list are taken verbatim. The only substitution performed is removing the backslash-newline groups.

A common error is to include a variable in braces   and expect it to be substituted:

% puts {the argument count is $argc}
the argument count is $argc
but
% puts "the argument count is $argc"
the argument count is 0

The most frequent use of braces is to group scripts, e.g. for commands that evaluate their argument (e.g. eval, bind) or to define procedures.



Micha Meier
Tue Jul 2 09:49:39 MET DST 1996