Version 4 of tcl::mathop

Updated 2008-07-13 00:38:17 by aspect

tcl::mathop is a Tcl 8.5 namespace that contains commands equivalent to the expr operators. These commands are all bytecode compiled. Note that changing or adding to these commands does not change the expr operators themselves.

See Math Operators as Commands.


[Add examples of how to make use of this functionality]

A simple example, because I couldn't immediately work out the incantation to make mathops visible. Note that functions and operators come from different namespaces:

  namespace import ::tcl::mathop::*
  namespace import ::tcl::mathfunc::*
  puts [* [sqrt 49] [+ 1 2 3]]