• 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: K&R Operator precedence (was: Re: ObjC method syntax)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: K&R Operator precedence (was: Re: ObjC method syntax)
      • From: Allan Odgaard <email@hidden>
References: 
 >K&R Operator precedence (was: Re: ObjC method syntax) (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: NSArrayController and bindings
  • Next by Date: Re: K&R Operator precedence (was: Re: ObjC method syntax)
  • Previous by thread: K&R Operator precedence (was: Re: ObjC method syntax)
  • Next by thread: Re: K&R Operator precedence (was: Re: ObjC method syntax)
  • Index(es):
    • Date
    • Thread