Re: How to create an NSDecimal?

2009-03-15 Thread Keary Suska
On Mar 14, 2009, at 6:32 PM, Michael Ash wrote: On Sat, Mar 14, 2009 at 6:55 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Mar 14, 2009, at 2:35 PM, Ashley Clark wrote: I don't see NSDecimalFromString() in any of the docs or header files, only NSDecimalString() to create strings.

Re: How to create an NSDecimal?

2009-03-15 Thread Luca Pazzerello
Probably Apple has removed that function with tiger...I remember having used it some years ago. --Luca C. 2009/3/15 Keary Suska cocoa-...@esoteritech.com Hmm, I can't find it either. Anyway, this was a function in NSDecimal.h that was part of NextStep that is still part of GnuStep, but must

Re: How to create an NSDecimal?

2009-03-15 Thread Jean-Daniel Dupas
Probably superseded by NSNumberFormatter in generatesDecimalNumbers mode. Le 15 mars 09 à 19:12, Luca Pazzerello a écrit : Probably Apple has removed that function with tiger...I remember having used it some years ago. --Luca C. 2009/3/15 Keary Suska cocoa-...@esoteritech.com Hmm, I

Re: How to create an NSDecimal?

2009-03-15 Thread Clark Cox
If it was ever there, it was removed long before Tiger. I just checked Cheetah (a.k.a. 10.0), and it was not there either. On Sun, Mar 15, 2009 at 11:12 AM, Luca Pazzerello luca.pazzere...@gmail.com wrote: Probably Apple has removed that function with tiger...I remember having used it some

How to create an NSDecimal?

2009-03-14 Thread WT
Hello all, 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

Re: How to create an NSDecimal?

2009-03-14 Thread Ashley Clark
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

Re: How to create an NSDecimal?

2009-03-14 Thread Luca Pazzerello
You can also create NSDecimals using NSDecimalFromString(). --Luca C. 2009/3/14 Ashley Clark acl...@ghoti.org 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

Re: How to create an NSDecimal?

2009-03-14 Thread Ashley Clark
I don't see NSDecimalFromString() in any of the docs or header files, only NSDecimalString() to create strings. Where is that defined? Ashley On Mar 14, 2009, at 2:08 PM, Luca Pazzerello wrote: You can also create NSDecimals using NSDecimalFromString(). --Luca C. 2009/3/14 Ashley Clark

Re: How to create an NSDecimal?

2009-03-14 Thread Keary Suska
On Mar 14, 2009, at 2:35 PM, Ashley Clark wrote: I don't see NSDecimalFromString() in any of the docs or header files, only NSDecimalString() to create strings. Where is that defined? It's part of Foundation, defined in NSDecimal.h. On Mar 14, 2009, at 2:08 PM, Luca Pazzerello wrote:

Re: How to create an NSDecimal?

2009-03-14 Thread Michael Ash
On Sat, Mar 14, 2009 at 6:55 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Mar 14, 2009, at 2:35 PM, Ashley Clark wrote: I don't see NSDecimalFromString() in any of the docs or header files, only NSDecimalString() to create strings. Where is that defined? It's part of Foundation,

Re: How to create an NSDecimal?

2009-03-14 Thread Michael Vannorsdel
Use the NSDecimalNumber class (subclass of NSNumber) and create it like you would any other NSNumber. Then use decimalValue to get the NSDecimal struct from it. There is no NSDecimalFromString, only the other way NSDecimalString. The only other way is to do it is manually by setting the

Re: How to create an NSDecimal?

2009-03-14 Thread WT
On Mar 15, 2009, at 1:50 AM, Michael Vannorsdel wrote: The only other way is to do it is manually by setting the struct members. typedef struct { signed int _exponent:8; unsigned int _length:4; unsigned int _isNegative:1; unsigned int _isCompact:1;