• 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: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel


  • Subject: Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
  • From: Corbin Dunn <email@hidden>
  • Date: Mon, 6 Jun 2005 14:58:35 -0700

Also: "On a Macintosh using an Intel microprocessor, Objective-C messages
sent to nil return garbage for return values that are typed as float or
double. On a Macintosh using a PowerPC microprocessor these messages
return 0.0."

Well, unfortunately, that isn't true! nil does return "garbage" when sent a message that returns a float. Well, technically, it returns what is currently in the floating point register. See example below.


-corbin

@interface Foo :NSObject
@end

@implementation Foo
-(float)test:(float)a {
    return 0.0;
}
@end

int main (int argc, const char * argv[]) {
    Foo *food = nil;
    float a = 0.234;
    float f = [food test:a];
    NSLog(@"Hello, World! %f", f);
    return 0;
}

_______________________________________________
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: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
      • From: Ondra Cada <email@hidden>
References: 
 >NYT confirms rumor of Apple switch to Intel (From: Raffael Cavallaro <email@hidden>)
 >[Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel (From: mmalcolm crawford <email@hidden>)
 >Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel (From: Nicko van Someren <email@hidden>)
 >Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel (From: mmalcolm crawford <email@hidden>)
 >Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
  • Next by Date: iTunes Artwork via Cocoa + AppleScript
  • Previous by thread: Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
  • Next by thread: Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
  • Index(es):
    • Date
    • Thread