• 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: Methods with the same name but different return types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Methods with the same name but different return types


  • Subject: Re: Methods with the same name but different return types
  • From: Ron Hunsinger <email@hidden>
  • Date: Sat, 04 Jun 2011 09:26:52 -0700

On Jun 4, 2011, at 7:10 AM, Eyal Redler wrote:
> That was my thought, that some other value is getting corrupted on the stack, the only problem is that int and float are the same size (at least under 32bit which is my case).

A 32-bit integer value, if negative but close to zero, would begin with a bunch of 1 bits. If you interpret that as a float, you'll see all 1s in the exponent field, and a non-zero mantissa. In other words, a NaN.

When the compiler sees multiple return types for -position, it has to pick one (after emitting a warning, if enabled). Perhaps clarifying which -position you wanted in one place gave it a clue which -position you wanted in others. Maybe. I don't know how the compiler chooses which to use. _______________________________________________
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: 
 >Methods with the same name but different return types (From: Eyal Redler <email@hidden>)
 >Re: Methods with the same name but different return types (From: Andreas Grosam <email@hidden>)
 >Re: Methods with the same name but different return types (From: Eyal Redler <email@hidden>)
 >Re: Methods with the same name but different return types (From: Andreas Grosam <email@hidden>)
 >Re: Methods with the same name but different return types (From: Eyal Redler <email@hidden>)

  • Prev by Date: Re: If you miss the "Table of Contents" in Xcode 4 Doc Viewer, Service to get you to the web
  • Next by Date: Re: compiler Flags for Code Porting
  • Previous by thread: Re: Methods with the same name but different return types
  • Next by thread: Debugger "Variable is not a CFDictionary"
  • Index(es):
    • Date
    • Thread