The following rules define the syntax and semantics of the Tcl language:
$name
There may be any number of variable substitutions in a single word. Variable substitution is not performed on words enclosed in braces.
- \a
- Audible alert (bell) (0x7).
- \b
- Backspace (0x8).
- \f
- Form feed (0xc).
- \n
- Newline (0xa).
- \r
- Carriage-return (0xd).
- \t
- Tab (0x9).
- \v
- Vertical tab (0xb).
- \<newline>whiteSpace
- A single space character replaces the backslash, newline, and all spaces and tabs after the newline. This backslash sequence is unique in that it is replaced in a separate pre-pass before the command is actually parsed. This means that it will be replaced even when it occurs between braces, and the resulting space will be treated as a word separator if it isn't in braces or quotes.
- \\
- Backslash (``\'').
- \ooo
- The digits ooo (one, two, or three of them) give the octal value of the character.
- \xhh
- The hexadecimal digits hh give the hexadecimal value of the character. Any number of digits may be present.
Backslash substitution is not performed on words enclosed in braces, except for backslash-newline as described above.