tcl Tcl Language Constructs Braces in comments

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Due to the way the Tcl language parser works, braces in the code must be properly matched. This includes the braces in comments.

proc hw {} { 
   # this { code will fail
   puts {hello world}
}

A missing close-brace: possible unbalanced brace in comment error will be thrown.

proc hw {} {
  # this { comment } has matching braces.
  puts {hello world}
}

This will work as the braces are paired up properly.



Got any tcl Question?