Re: K&R Operator precedence (was: Re: ObjC method syntax)
Re: K&R Operator precedence (was: Re: ObjC method syntax)
- Subject: Re: K&R Operator precedence (was: Re: ObjC method syntax)
- From: Ondra Cada <email@hidden>
- Date: Thu, 26 Feb 2004 11:17:14 +0100
On Thursday, Feb 26, 2004, at 08:53 Europe/Prague, Allan Odgaard wrote:
Thanks K&R, we got decent operator priorities in ObjC ;)))
You mean like:
enum { FLG_Slow = 1, FLG_Fast = 2 };
int flags = FLG_Fast;
if(flags & FLG_Fast == FLG_Fast)
printf("Be fast!\n");
else printf("Be slow!\n");
(a) this is properly written "if (flags&FLG_Fast) ..." ;)))
(b) though indeed the low priority of bitwise ops seems to me (about
the only) priority design flaw in C--does anybody know any rationale
behind it?
(c) do I feel right it is gradually becoming a tad OT? ;)))
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.