Re: How to create an NSDecimal?
Re: How to create an NSDecimal?
- Subject: Re: How to create an NSDecimal?
- From: Michael Vannorsdel <email@hidden>
- Date: Sat, 14 Mar 2009 18:50:07 -0600
Use the NSDecimalNumber class (subclass of NSNumber) and create it
like you would any other NSNumber. Then use decimalValue to get the
NSDecimal struct from it. There is no NSDecimalFromString, only the
other way NSDecimalString. The only other way is to do it is manually
by setting the struct members.
typedef struct {
signed int _exponent:8;
unsigned int _length:4;
unsigned int _isNegative:1;
unsigned int _isCompact:1;
unsigned int _reserved:18;
unsigned short _mantissa[NSDecimalMaxSize];
} NSDecimal;
On Mar 14, 2009, at 6:32 PM, Michael Ash wrote:
It's not in any of the copies of NSDecimal.h on *my* system
(10.5.6)....
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden