lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.