From: jeremy AT jdyallop DOT freeserve DOT co DOT uk (Jeremy Yallop) Newsgroups: comp.lang.c++,comp.os.msdos.djgpp Subject: Re: Making C++ little easier to beginners... References: <9qmkrh$581$1 AT tron DOT sci DOT fi> Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: slrn/0.9.6.3 (Linux) Lines: 44 Date: Thu, 18 Oct 2001 19:33:18 GMT NNTP-Posting-Host: 62.253.146.44 X-Complaints-To: abuse AT ntlworld DOT com X-Trace: news2-win.server.ntlworld.com 1003433598 62.253.146.44 (Thu, 18 Oct 2001 20:33:18 BST) NNTP-Posting-Date: Thu, 18 Oct 2001 20:33:18 BST Organization: ntlworld News Service To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Traveler (traveler AT netti DOT fi) wrote in comp.lang.c++: [...] > >wouldn´t this be nicer ? > >if(x EQUAL 10 AND y EQUAL 10) C++ already provides some of what you want. >#define AND & For this you have bit_and. >#define COMPLEMENT ~ compl >#define EQUAL == >#define EQU EQUAL >#define NOT ! not >#define OR | bitor >#define XOR ^ xor Also provided are: not_eq (!=) and_eq (&=) xor_eq (^=) or_eq (!=) or (||) and (&&) -- Jeremy Yallop - jeremy AT jdyallop DOT freeserve DOT co DOT uk "Many are the thoughts in a man's heart, but the counsel of Jehovah, that doth stand." Proverbs 19: 21