• 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: Currency Numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Currency Numbers


  • Subject: Re: Currency Numbers
  • From: nino <email@hidden>
  • Date: Wed, 28 Jun 2006 19:51:02 +0200

Hi,
> on currency_format for v
> tell (v mod 1 as text) * 100 to (v div 1 as text) & (0.0 as text)'s
> character 2 & ((it * it) ^ 0.5 + 0.5) div 1
> end currency_format
the full tread it's very interesting and I've learned a lot ... but

 currency_format for -123.995 => "-123,100" on an Italian system.

Since all that was aimed at roundig currency format it shuld be "124.00".

so here is my suggestion

on currency_format for v
    ((round v * 100) div 100 as text) & text 2 thru 4 of (((abs (round (v
mod 1 * 100)) / 100) as string) & "0")
end currency_format


nino

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Deselecting the selection in the finder window
  • Next by Date: Re: Add/Remove from Dock?
  • Previous by thread: Re: Currency Numbers
  • Next by thread: Re: Currency Numbers
  • Index(es):
    • Date
    • Thread