Newsgroups: comp.lang.c
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: strcmp
Message-ID: <1991Jun26.100306.6615@thunder.mcrcim.mcgill.edu>
Organization: McGill Research Centre for Intelligent Machines
References: <2695@m1.cs.man.ac.uk> <67790004@hpcupt1.cup.hp.com>
Date: Wed, 26 Jun 91 10:03:06 GMT
Lines: 20

In article <67790004@hpcupt1.cup.hp.com>, thomasw@hpcupt1.cup.hp.com (Thomas Wang) writes:

> #define COMP_GREATER   (1)
> #define COMP_EQUAL     (0)
> #define COMP_LESS      (-1)
> #define COMP_UNORDERED (MININT)

> #define LE(x) (-(x) >= COMP_EQUAL) /* less than or equal, -MININT == MININT */

-MININT is not necessarily equal to MININT.  Suppose integers are
sign-magnitude, or ones-complement, or balanced-ternary[%]....

[%] This is legal, though painful ugliness is mandated to preserve the
    appearance of binary for numbers from 0 to INT_MAX.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
