On Jul 22, 2010, at 1:15 PM, Quincey Morris <quinceymor...@earthlink.net> wrote:
> Incidentally, if you're dealing with currency, it's better to use integers > (the number of cents, rather than the number of dollars, essentially) rather > than floating point. Actually, the OP has said that her data model has these attributes as decimal; this means the values will be instances of NSDecimalNumber. This is correct, and is how you should generally work with currency values in Cocoa (rather than as integers) because it allows you control over rounding behavior, which can be very important in financial calculations. NSDecimalNumber also has calculation methods to use, so the OP doesn't need to use +-*/%, but rather the equivalent methods on NSDecimalNumber instances. -- Chris _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com