Visible to Intel only — GUID: mwh1410471031333
Ixiasoft
Visible to Intel only — GUID: mwh1410471031333
Ixiasoft
2.9.10. Syntax and Comments
Tcl uses the hash or pound character (#) to begin comments. The # character must begin a comment. If you prefer to include comments on the same line as a command, be sure to terminate the command with a semicolon before the # character. The following example is a valid line of code that includes a set command and a comment.
set a 1;# Initializes a
Without the semicolon, the command is invalid because the set command does not terminate until the new line after the comment.
The Tcl interpreter counts curly braces inside comments, which can lead to errors that are difficult to track down. The following example causes an error because of unbalanced curly braces.
# if { $x > 0 } { if { $y > 0 } { # code here }