• 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: Carlos Ysunza <email@hidden>
  • Date: Thu, 22 Jun 2006 17:58:44 -0500
  • Thread-topic: Currency Numbers

Title: Re: Currency Numbers
On Tue, 20 Jun 2006 21:44:18 +0100 Kai wrote
Sorry - wrong version. That should have been:

------------------

on currency_format for v
    tell (((v mod 1 as text) * 100) ^ 2) ^ 0.5 + 0.5 to (v div 1 as  
text) & (0.0 as text)'s character 2 & it div 1
end currency_format

currency_format for -123.4

  • "-123,40" / "-123.40" (* depending on local currency formatting *)
--------------------------------
I follow with interest all this solutions, and learn a lot, of all of them, but
I wonder why  use “(0.0 as text)'s character 2” and not simply use the dot character as in my own version?
Is there any reason that I can’t see?
currencyFormat for 4567.819
on currencyFormat for v
   tell (((v mod 1 as string) * 100) ^ 2) ^ 0.5 to ((v div 1 as string) & ".") & (it div 0.5 - it div 1) as string
end currencyFormat
Thanks

Carlos Ysunza B.
Director
Ysunza/Santiago
Visual Communication • Automation
Tel. (52)55 5256-0336
email@hidden

http://www.ysunzasantiago.com
http://www.thesecretmexico.com
http://www.softrobot.com.mx
 _______________________________________________
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

  • Follow-Ups:
    • Re: Currency Numbers
      • From: Christopher Nebel <email@hidden>
  • Prev by Date: thumbnail images
  • Next by Date: Re: Intel UI scripting
  • Previous by thread: Re: Currency Numbers
  • Next by thread: Re: Currency Numbers
  • Index(es):
    • Date
    • Thread