2 ms·
I will be borrowing this: "its syntax isn't just simple, it's simplistic" I've lost hours to the syntax errors in comments before. Coupled with TCL's bad error
by engtech 14y ago
I will be borrowing this: "its syntax isn't just simple, it's simplistic"
I've lost hours to the syntax errors in comments before. Coupled with TCL's bad error messages it's maddening.
#syntax errors in comments are dumb
proc test {a b} {
} # test
% source tmp.tcl
wrong # args: should be "proc name args body"
How long does it take to find that one in a 1000 line file? It doesn't even give a file name or line number.
- tpoindex 14y agoYou might try Nagelfar, an extensible syntax checker: http://nagelfar.berlios.de/ http://nagelfar.berlios.de/ Nagelfar can easily find these types of errors, plus you should be able to define syntax for your own commands (as in your previous comment.) tclsh nagelfar.tcl engtech.tcl Checking file engtech.tcl Line 1: E Wrong number of arguments (5) to "proc" Argument 4 at line 2 Argument 5 at line 2 Comments are warty in Tcl, you would be better off to understand Tcl's syntax conventions, rather than assuming comments work like other languages. See item #10 at: http://wiki.tcl.tk/10259 http://wiki.tcl.tk/10259