+ set relation ""
+ set len [string length $term]
+ incr len -1
+
+ if {$len > 1} {
+ if {[string index $term 0] == ">"} {
+ if {[string index $term 1] == "=" } {
+ set term [string trim [string range $term 2 $len]]
+ set relation 4
+ } else {
+ set term [string trim [string range $term 1 $len]]
+ set relation 5
+ }
+ } elseif {[string index $term 0] == "<"} {
+ if {[string index $term 1] == "=" } {
+ set term [string trim [string range $term 2 $len]]
+ set relation 2
+ } elseif {[string index $term 1] == ">"} {
+ set term [string trim [string range $term 2 $len]]
+ set relation 6
+ } else {
+ set term [string trim [string range $term 1 $len]]
+ set relation 1
+ }
+ }
+ }