• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa-dev digest, Vol 1 #999 - 7 msgs


  • Subject: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • From: Jeff Koftinoff <email@hidden>
  • Date: Thu, 20 Dec 2001 23:24:27 -0800

On Thursday, December 20, 2001, at 10:17 PM, cocoa-dev-
email@hidden wrote:


On Thursday, December 20, 2001, at 11:58 am, Jens Bauer wrote:

Hi John,


#define is ==
#define or ||
#define and &&

Definately a good solution!


Except for the poor developer who has to maintain your code latter. If i
had to edit code like that the first thing i would do is switch everything
back to normal and remove the macros.

vince


Unfortunately for you, ANSI C++ defines the very same operator names except for == and = without macros.

and
and_eq
bitand
bitor
compl
not
not_eq
or
or_eq
xor
xor_eq

So....

{
bool a,b,c;
a and_eq b;
a xor_eq c;
}

is completely valid standard code.


Jeff Koftinoff


  • Follow-Ups:
    • Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
      • From: Ondra Cada <email@hidden>
    • Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
      • From: Mason Mark <email@hidden>
    • Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Silly question
  • Next by Date: Re: (OT) auto-indent a big hit here
  • Previous by thread: DO, NSConnection, NSThreads, NSRunLoops, and method running/stopping
  • Next by thread: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • Index(es):
    • Date
    • Thread