Re: NSDecimalRound
Re: NSDecimalRound
- Subject: Re: NSDecimalRound
- From: Jonathan Jackel <email@hidden>
- Date: Sun, 30 Nov 2003 07:45:34 -0500
NSDecimal is a struct, not an object. NSRange, NSPoint, and NSRect are
also structs, so this is not at all uncommon.
NSDecimalNumber is an object that wraps NSDecimal in Objective C. If
you want a number object (say, to put in an NSArray or NSDictionary)
and you want to do math with it (including rounding), use
NSDecimalNumber.
Jonathan
On Nov 30, 2003, at 3:29 AM, Jay Rimalrick wrote:
here is a function that looks like it will do the job for me
void NSDecimalRound(NSDecimal* result, const NSDecimal* number, int
scale,
NSRoundingMode mode);
however I am not sure how you actually get NSDecimal data types.
I tried
NSDecimal* myDecimal = [[NSDecimal alloc] init];
and i get the error "NSDecimal is not an objective-c class"
how am i to use the function if NSDecimal is not a class?
thanks in advance
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.