• 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: ObjC BOOL and boolean c expressions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC BOOL and boolean c expressions


  • Subject: Re: ObjC BOOL and boolean c expressions
  • From: Eyal Redler <email@hidden>
  • Date: Sat, 01 Sep 2007 08:34:22 +0300

I'd like to thank everybody for the informative answers.




On Aug 31, 2007, at 21:28, Charles Steinman wrote:

--- John Stiles <email@hidden> wrote:

I *think* that the C spec doesn't specify the result
of a boolean
expression other than "zero means false, nonzero
means true." So from
a "compliance with the spec" standpoint, the first
version might
return different results from the second version.

I don't know about earlier versions, but the C99 spec guarantees that they will return 1 if true and 0 if not. The logic for determining whether something is true or false still boils down to "zero means false, nonzero means true," obviously, but the operators themselves can only return 1 or 0.

Cheers,
Chuck



______________________________________________________________________ ______________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: ObjC BOOL and boolean c expressions (From: Charles Steinman <email@hidden>)

  • Prev by Date: Re: core data app questions - help!
  • Next by Date: Text Animation
  • Previous by thread: Re: ObjC BOOL and boolean c expressions
  • Next by thread: Re: ObjC BOOL and boolean c expressions
  • Index(es):
    • Date
    • Thread