Re: RFC: booleans and the kernel

Timothy Covell
2002-01-24T21:44:51Z

On Thursday 24 January 2002 15:31, Oliver Xymoron wrote:
> On Fri, 25 Jan 2002, Timothy Covell wrote:
> > On Thursday 24 January 2002 14:39, Oliver Xymoron wrote:
> > > The compiler _will_ turn if(a==0) into a test of a with itself rather
> > > than a comparison against a constant. Since PDP days, no doubt.
> >
> > I thought that the whole point of booleans was to stop silly errors
> > like
> >
> > if ( x = 1 )
> > {
> > printf ("\nX is true\n");
> > }
> > else
> > {
> > # we never get here...
> > }
>
> And how does s/1/true/ fix that?

It doesn't fix "if ( x = true)". If would
just make it more legit to use "if (x)".
Just IMHO.

--
timothy.covell@ashavan.org.