• 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: Mason Mark <email@hidden>
  • Date: Fri, 21 Dec 2001 00:16:49 -0800

On Thursday, December 20, 2001, at 11:24 PM, Jeff Koftinoff wrote:
[snip snip snip]
#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.

Well, this is completely valid standard code, too:

if :?buttonToggleScript(o2)
then return o1;

...it's just not standard *C*.

--
Mason


References: 
 >Re: cocoa-dev digest, Vol 1 #999 - 7 msgs (From: Jeff Koftinoff <email@hidden>)

  • Prev by Date: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • Next by Date: Re: division with long long
  • Previous by thread: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • Next by thread: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • Index(es):
    • Date
    • Thread