• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDecimalRound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDecimalRound


  • Subject: Re: NSDecimalRound
  • From: Clark Cox <email@hidden>
  • Date: Sun, 30 Nov 2003 03:45:54 -0500

First, if a post belongs in the same thread, try not to change the
subject; doing so makes it dificult for mail clients to recognize where
one thread starts and the other ends..

Second, if you want to create a string from a float, you can simply use
-stringWithFormat: like so:

myString = [NSString stringWithFormat: @"%.2f", myFloat];

This will create a string from myFloat with two significant digits
after the decimal point.


On Nov 30, 2003, at 03:29, 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
>
>
>
>
> ________________________________________________________________
> Sent via the WebMail system at 1st.net
> _______________________________________________
> 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.
>


--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.

References: 
 >NSDecimalRound (From: "Jay Rimalrick" <email@hidden>)

  • Prev by Date: NSDecimalRound
  • Next by Date: Re: NSDecimalRound
  • Previous by thread: NSDecimalRound
  • Next by thread: Re: NSDecimalRound
  • Index(es):
    • Date
    • Thread