Question about floatValue on nil object
Question about floatValue on nil object
- Subject: Question about floatValue on nil object
- From: Michaël Parrot <email@hidden>
- Date: Tue, 13 Sep 2005 10:42:44 +0200
Hi,
I am small question. I get a NSNumer from a NSDictionary (or other,
not important) and this object is equal to nil.
NSNumber *n=nil;
NSLog(@"la %f",[n floatValue]);
NSLog(@"la %d",[n intValue]);
My problem is that the second nslog show 0 value but floatValue
return aleatory value.
What is the problem ?
Sure, I can check if number if equal to nil, but I am suprised that
[nil floatValue] don't return nil.
Thanks a lot for comment about this.
Michaël Parrot
Parrot's Softwares
http://www.mparrot.net
_______________________________________________
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