[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lexciographical comparison of tuples
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 20 Jan 2012 07:25:08 +0200
I have an application with lots of tuples of non-negative integers, on
which I need to do lexicographical comparisons. I've discovered that
string comparison works if you format the tuples as comma-separated
lists inside parentheses, e.g. "(1,5)"<"(10,5)" and "(0,0)"<"(0,0,0)".
The reason is that parentheses compare less than comma, and comma less
than a digit, even in EBCDIC.