Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
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