[OCLUG-devel] Lexicographically Sorted

Chris Berry chris_berry-list-oclug-devel at jm-associates.com
Wed May 25 17:47:33 PDT 2005


I'm supposed to write a C program that works similiar to strcmp, book 
definition follows:

*********
Compares two strings s1 and s2 lexicographically.  The elements of the 
strings are treated as unsigned characters.  The function returns a 
value that is less than, equal to, or greater than zero, depending on 
whether s1 is lexicographically less than, equal to, or greater than s2.
*********

No problem, except I haven't been able to figure out what lexicographic 
ordering is.  I know how to sort alphabetically and ASCIIbetically, but 
lexicographically is a new one.  When I looked on google, it seemed like 
everyone thought it was so obvious it didn't need to be explained.  Can 
someone clue me in here?

-- 
Chris Berry
chris_berry at jm-associates.com
Information Advisory Manager
JM Associates

"There is nothing so useless as doing efficiently that which should not 
be done at all." --Peter Drucker


More information about the OCLUG-devel mailing list