delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/19/11:19:08

From: Arnold Hendriks <a DOT hendriks AT b-lex DOT com>
Newsgroups: comp.lang.c++,comp.os.msdos.djgpp
Subject: Re: Making C++ little easier to beginners...
Date: 19 Oct 2001 15:06:51 GMT
Organization: Echelon bv/BTCnet internet services
Lines: 14
Message-ID: <9qpfib$lbv$1@news.btcnet.nl>
References: <9qmkrh$581$1 AT tron DOT sci DOT fi> <9qmlmq$lou$1 AT News DOT Dal DOT Ca> <9qnuii$kn8$1 AT tron DOT sci DOT fi>
NNTP-Posting-Host: ns.b-lex.com
X-Trace: news.btcnet.nl 1003504011 21887 217.119.224.163 (19 Oct 2001 15:06:51 GMT)
X-Complaints-To: abuse AT echelon DOT nl
NNTP-Posting-Date: 19 Oct 2001 15:06:51 GMT
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i586))
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In comp.lang.c++ Traveler <traveler AT netti DOT fi> wrote:
>> There are *huge* differences between logical and bitwise
>> operators.  Please read a good C++ book to understand the differences.
> Please read a good Boolean algebra book to see that there really is no difference between "logical" AND/OR and "bit" AND/OR.
2 & 1 == 0      (evaluates to false)
2 AND 1 == 0    (your AND #define)
2 && 1 == true

Logical and bitwise AND/OR cannot be considered equivalent. You 
should reread or burn your book.

-- 
Arnold Hendriks <a DOT hendriks AT b-lex DOT com>
B-Lex Information Technologies, http://www.b-lex.com/

- Raw text -


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