• 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: Unnecessary Boolean Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unnecessary Boolean Warning


  • Subject: Re: Unnecessary Boolean Warning
  • From: Thomas Davie <email@hidden>
  • Date: Mon, 01 Aug 2011 07:34:04 +0100

On 1 Aug 2011, at 00:09, Marco S Hyman wrote:

> On Jul 31, 2011, at 1:13 PM, Gordon Apple wrote:
>
>> The following expression generates a warning message (“&&” within “||”) and
>> says to include the “anded” expression in parens.  Anybody who understands
>> basic boolean operator precedence knows this is unnecessary.  Bug report?
>
> Anyone who's debugged lots of code knows that there are too many
> programmers out there that do NOT have boolean operator precedence
> memorized and sometimes get it wrong.  I'm one of them, but then I
> have page 49 of the '78 version of my K&R bookmarked so I can check
> when needed.  Not everyone bothers to check.

I do think this warning should stay, but for future reference – you don't need to go back to K&R to figure this out… Just think of it as being the multiplicative operator having precedence. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Unnecessary Boolean Warning (From: Gordon Apple <email@hidden>)
 >Re: Unnecessary Boolean Warning (From: Marco S Hyman <email@hidden>)

  • Prev by Date: Re: Unnecessary Boolean Warning
  • Previous by thread: Re: Unnecessary Boolean Warning
  • Index(es):
    • Date
    • Thread