[expr] comparison operator; returns either a 1 or a 0, depending on whether the first argument is '''greater''' than the second. ====== $ tclsh8.5 % tcl::mathop::> 1 2 0 % tcl::mathop::> 2 1 1 % tcl::mathop::> 2 2 0 % tcl::mathop::> a b 0 % tcl::mathop::> b a 1 % tcl::mathop::> abc 123 1 % tcl::mathop::> abc abcd 0 ====== [AMG]: Beware! ====== % set b 10 % set a 017; expr {$a > $b} ;# returns 1 (true) % set a 018; expr {$a > $b} ;# returns 0 (false) ====== 017 and 10 are both valid integers, though the former is octal and the latter decimal. The comparison being performed in the first case is between 15 (017 in decimal) and 10. 018 is not a valid integer, and taken as a string it sorts before the string 10, hence the second comparison returns false. Because of the possible numeric interpretations of some strings, I wouldn't consider using `>`, `>=`, `<`, `<=`, `==`, or `!=` to perform string comparisons. Instead use `[eq]` and `[ne]` for equality and [[[string compare]]] for sorting. Despite the presence of `eq` and `ne`, there are no `gt`, `ge`, `lt`, and `le` dedicated string comparison operators. <> Operator