12.6.5     <             >    <=     >=

Boolean less, greater, less than or equal, and greater than or equal. Each operator produces 1 if the condition is true, 0 otherwise. These operators may be applied to strings as well as numeric operands, in which case string comparison is used.

An example is:
 

if {$msglength > 0} then {  

    if { [string first , $idtext]<=0 } then {

        append idtext ","

        set msglength [expr $msglength+1]

       }

  }