O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSDecimalNumberBehaviors — Mac OS X 10.0

Synopsis

This protocol defines the interface to objects that control aspects of the behavior of NSDecimalNumber objects. In particular, there are three methods that classes implement to specify rounding behavior, number precision, and a means for handling calculation errors. The Foundation framework implements this protocol in the class NSDecimalNumberHandler.

@protocol NSDecimalNumberBehaviors
                                  // Instance Methods
   - (NSRoundingMode)roundingMode;
   - (short)scale;
   - (NSDecimalNumber *)exceptionDuringOperation:(SEL)operation 
                                 error:(NSCalculationError)error
                                 leftOperand:(NSDecimalNumber *)leftOperand 
                                 rightOperand:(NSDecimalNumber *)rightOperand;
@end

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required