Re: [Moderator] EOT Re: NYT confirms rumor of Apple switch to Intel
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