Re: Methods with the same name but different return types
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