Re: How to create an NSDecimal?
Re: How to create an NSDecimal?
- Subject: Re: How to create an NSDecimal?
- From: Ashley Clark <email@hidden>
- Date: Sat, 14 Mar 2009 12:07:44 -0500
On Mar 14, 2009, at 11:28 AM, WT wrote:
I was reading the "Number and Value Programming Topics for Cocoa"
section about decimal numbers and now I'm confused. If I want to
use the C interface rather than the NSDecimalNumber class, how do I
"instantiate" an NSDecimal struct? According to the "Foundation Data
Types Reference", the fields of NSDecimal are private. I couldn't
find any function that takes the necessary data and returns an
NSDecimal, so how do I create an NSDecimal?
You can get an NSDecimal structure from any NSNumber or
NSDecimalNumber object by sending it the -decimalValue message. As far
as I know that's the only way to create one.
Ashley
_______________________________________________
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