On Aug 8, 2013, at 11:04 AM, Scott Ribe <[email protected]> wrote: > On Aug 8, 2013, at 11:50 AM, Jens Alfke <[email protected]> wrote: >> I can’t quote you from the C language spec, but I’d be very surprised if >> this were true. The result of (type)+(type) is the same (type), for all >> numeric types; same for the other built-in operators. > > On Aug 8, 2013, at 11:19 AM, John McCall <[email protected]> wrote: > >> If all the operands to an operator are floats, the operation occurs in >> float, and >> the type of the result will be float. > > Good god, I am old, and you two are making me feel it today. I usually turn > to Harbison & Steele for plain C questions, and here's what the 5th Edition > (2002) says: > > "Prior to Standard C, implementations were required to convert all values of > type float to type double before any operations were performed… In Standard > C, operations can now be performed using type float…" > > So, in summary: GET OFF MY LAWN YOU DAMN KIDS!!!
To which the obvious rejoinder is: maybe you should get out a little more, grandpa. :) When a rule hasn’t been in force for over twenty years, it might be time to realize that it’s not the rule anymore. John. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
