What are the benefits/downsides between using the NSInteger (or NSNumber) and float/int?
What exactly is decimal??
Thank you!
NSInteger is just a type def of int when using it on the iPhone, but on OSX will change form 32 bit int to 64 bit int if you build your code for a 64 bit machine.
NSNumber is an object that can hold any type of number, being float, integer, double, long ect..
NSDecimal is a struct which will tell you about some detail about the floating point value of a NSNumber.
NSDecimalNumber is a subclass of NSNumber which can hold a more exact floating point value: see @dreanlax comment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With