3 ms·
expr is horrible though. but i love tcl.
by uwagar 5y ago
expr is horrible though. but i love tcl.
- yesenadam 5y agoIt's easy to alias expr to =, which enhances write- and readability : % interp alias {} = {} expr = % set x [= 2 + 3] 5 Also aliasing lindex to @ is nice % interp alias {} @ {} lindex % set a {1 2 3} 1 2 3 % @ $a 1 2
- pwg 5y agoAlso, if you set your namespace path like so: namespace path {::tcl::mathop ::tcl::mathfunc} Then you get very LISP like math operators % set x [+ 2 3 [- 5 20]] -10 and math functions % set x [abs -12] 12