• 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: Bug or feature?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug or feature?


  • Subject: Re: Bug or feature?
  • From: Craig Altenburg <email@hidden>
  • Date: Tue, 14 Feb 2006 13:03:35 -0500


On Feb 14, 2006, at 12:57 PM, M. Carlson wrote:

What number should variable 'fval' have after this is executed?

- (void) doit
{
   float fval=0.0;
   NSNumber *aNumber=nil;
   fval=[aNumber floatValue];
   NSLog(@"fval is %f",fval);
}


I'd guess zero. Thats what you generally get from sending a message to nil.



--M


_______________________________________________ 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

_______________________________________________ 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
References: 
 >Bug or feature? (From: "M. Carlson" <email@hidden>)

  • Prev by Date: Re: Core Data, transient ivars and undo
  • Next by Date: Re: Bug or feature?
  • Previous by thread: Bug or feature?
  • Next by thread: Re: Bug or feature?
  • Index(es):
    • Date
    • Thread