Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!rochester!crowl From: crowl@rochester.ARPA (Lawrence Crowl) Newsgroups: net.lang.c Subject: Re: Byte order (or you are both wrong) Message-ID: <17420@rochester.ARPA> Date: Mon, 21-Apr-86 08:32:12 EST Article-I.D.: rocheste.17420 Posted: Mon Apr 21 08:32:12 1986 Date-Received: Thu, 24-Apr-86 05:27:33 EST References: <7046@cca.UUCP> <6578@utzoo.UUCP> <17162@rochester.ARPA> <2568@utcsri.UUCP> Reply-To: crowl@rochester.UUCP (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 34 In article <2568@utcsri.UUCP> greg@utcsri.UUCP (Gregory Smith) writes: >In article <17162@rochester.ARPA> crowl@rochester.UUCP (Lawrence Crowl) writes: >>CHALLENGE: Come up with a scheme for representing numbers, and a sorting >>scheme in which numbers sort naturally. Your scheme must deal with variable >>length character strings and variable size numbers. That is, you cannot >>requires strings to be padded with nulls, or numbers to be padded with zeros. >How about prepending the digit count to big-endian digit strings? >so 32 and 126 become 232 and 3126, and a lexical comparison gives >3126 > 232. Of course, leading zeroes in the significand cannot be used. ... The problem with this scheme is that it assumes a constant size "length" field. This is the best that I have yet seen though. >>Note that many part numbering schemes have intermixed letters and digits. >But what significance do letters have? do you want them to be ignored, >or to be assigned a dictionary order with the numbers? This is part of the problem! >P.S. this rather obscure scenario hardly seems reason to state that >little- and big-endians are both wrong. Sort the following list of "words": 302, 3B2, -42, 132, 26, AD, ab, 74LS00 --The damn poster program wants more lines. --It says "more included lines than new next". --I've said all I want to say. --You want more lines? --Take this! --Feed it to your line eater! --Burp! -- Lawrence Crowl 716-275-5766 University of Rochester Computer Science Department ...!{allegra,decvax,seismo}!rochester!crowl Rochester, New York, 14627