RE: Or
RE: Or
- Subject: RE: Or
- From: Jeff Howe <email@hidden>
- Date: Wed, 10 Oct 2001 09:25:59 -0400
>
-----Original Message-----
>
From: Rosyna [mailto:email@hidden]
>
Sent: Friday, October 05, 2001 9:58 PM
>
To: email@hidden
>
Subject: Re: Or
>
>
>
Just cause I am a stickler.
>
>
1. If you have the 10.1 dev tools, rename the file to end in .mm ;)
>
>
2. #define or ||
>
#define and &&
>
#define not !
For the hopelessly pedantic, this sort of stuff is done for you in a
compiler that supports the C99 standard, in the header file iso646.h.
Unfortunately, I don't think that this is in the OS X 10.0 distribution, so
you can't depend on the actual header file, but it's probably a good idea to
use the Standard's spellings for your own use. Anyways, here's the relavant
section in the Standard:
7.9 Alternative spellings <iso646.h>
1 The header <iso646.h> defines the following eleven macros (on the left)
that expand
to the corresponding tokens (on the right):
and &&
and_eq &=
bitand &
bitor |
compl ~
not !
not_eq !=
or ||
or_eq |=
xor ^
xor_eq ^=
~Jeff
>
Ack, at 10/5/01, email@hidden said:
>
>
>How do I say "or" in objective-C? I've read books, but can't find
>
>the key combo, and just typing in or doesn't work.
>
>
>
>Example: while (secFibi != 0 or fibi != 1)
for Insane People
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev