• 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: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)


  • Subject: Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • From: Martin Hairer <email@hidden>
  • Date: Tue, 14 Feb 2006 18:40:13 +0000

Would it be fair to conclude that a float value takes up more stack space than an integer, and thus the "odd" behavior? I.e., it's only zeroing out space enough for an integer, not a float value, so whatever's sitting beyond the integer on the stack is being returned as part of the float value?

No, a float takes up 32 bits, which is the same as an integer. Since the docs say
that such a message only usually returns 0 on PowerPC machines (unless the
return value is an ObjC object), the observed behaviour is not tremendously surprising.
Of course, one may wonder what the word "usually" means in this context. It seems
to me that this sentence could just as well have been replaced by something like
"on PowerPC based machines the return value is undefined", which would have been
less misleading. Regards,


Martin

HairerSoft
http://www.hairersoft.com/


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
      • From: Daniel Jalkut <email@hidden>
    • Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
      • From: "M. Carlson" <email@hidden>
References: 
 >RE: floatValue of nil NSNumber unreliable (was Re: Bug or feature?) (From: "M. Carlson" <email@hidden>)

  • Prev by Date: Re: MDItemCreate very, very, very, slow -- and fails
  • Next by Date: Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • Previous by thread: RE: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • Next by thread: Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • Index(es):
    • Date
    • Thread