delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/04/05:56:31

From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: how to interpret this...
Date: Tue, 03 Dec 1996 18:04:23 GMT
Lines: 31
Message-ID: <849636258.25736.2@abwillms.demon.co.uk>
References: <57ve1o$rfk AT lyra DOT csx DOT cam DOT ac DOT uk>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

gpt20 AT thor DOT cam DOT ac DOT uk (G.P. Tootell) wrote:
>instead of treating this as a==b && b==c && c==0, it treated it as a==b && c==0
>can anyone explain this behavior? should it not have been reported as a warning?

Bear in mind that a==b returns an integer - zero if a!=b, nonzero
(usually 1) if a==b.

Thus a==b==c returns 1 is a==b and c is true, or a==b and c is false.
If I've got the associativity right.

a==b==c==0 does something similar. Probably inverts the entire above
sentence - checking if something is zero is the same as logically
inverting it...

>nik

>-- 

ABW
--

"Simply drag your mother in law's cellphone number from the
Address Book to the Laser Satellite icon, and the Targeting
Wizard will locate her. Then follow the onscreen prompts for
gigawattage and dispersion pattern..."

(Windows for Early Warning and Defence User's manual P385)

Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.abwillms.demon.co.uk/">Hello :-)</A>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019