• 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: UInt32 and ==
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UInt32 and ==


  • Subject: Re: UInt32 and ==
  • From: Lance Bland <email@hidden>
  • Date: Tue, 9 Apr 2002 10:06:42 -0400

On Tuesday, April 9, 2002, at 09:46 AM, Jaeho Chang wrote:

Could someone explain why this is?

Well, we have this:

libkern/OSTypes.h:typedef unsigned char Boolean;

so that the higher bits is truncated off in your first expression by an implicit demotion.

when you use the == operator it reduces any non-zero value to a one value, which fits in the first 8 bits.

does that explain it well enough?

-lance

------------------------------------
Lance Bland
mailto:email@hidden
web charts at http://www.vvi.com/products/chart
_______________________________________________
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.

References: 
 >UInt32 and == (From: Jaeho Chang <email@hidden>)

  • Prev by Date: UInt32 and ==
  • Next by Date: Re: UInt32 and ==
  • Previous by thread: UInt32 and ==
  • Next by thread: Re: UInt32 and ==
  • Index(es):
    • Date
    • Thread