Comparison operators
In TL-Script numbers, character strings, boolean values and sets with arbitrary values of these types can be compared with each other.
Numbers
Numbers are compared according to their natural order.
Strings
Strings are compared based on their technical order (neither upper and lower case letters nor letters with and without accents are identified with each other). Here, "A" < "a"
and "Á" != "A"
. Special functions are available for comparisons that produce lexicographic order, see Compare strings.
Boolean
When comparing booleans, i.e., true
and false
, true
is greater than false
.
Sets
Sets are compared element by element. A set l1
is smaller than a set l2
if there is an index n
at which its element l1[n]
is smaller than the element l2[n]
, but all other elements l1[k]
are equal to the elements l2[k]
for k < n
. This comparison identifies one-element sets and single values with each other. That is, a one-element set is equal to its single value contained in it.