Forum OpenACS Development: Re: empty_string_p obsolete?

Posted by Gustaf Neumann on
Tcl 8.4 was released 2002. If you are updating code, please note that there is a 'ne' operator as well. Comparisons like '$somevar == "someflag"', where no numerical comparison is wanted, should use 'eq' and 'ne' as well. The operators '==' and '!=' should be used for numerical comparisons only.

As we are on the matter: The argument of expr should be practially always written between curley brackets, otherwise expr is not byte-code-compiled. Code like 'set a [expr 1+$b]' should be written as 'set a [expr {1+$b}]'.