Tcl syntax
Tcl scripts are nothing more than plaintext files saved with 16-bit Unicode encoding. Such a script consists of one or more commands that are executed by the interpreter at runtime.
Each line of the script (with exceptions described as follows) consists of the command and zero or more command arguments, all separated by whitespaces (spaces or tabs).
If the line starts with the # character, it is considered to be a comment and not processed by the interpreter.
If the line ends with the \ (backslash) character, the next line is considered to be a continuation of current one. This is useful for breaking long lines and improving the readability of the code.
You can also join separate commands using;, as shown in the following example:
puts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access