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

Re: Simple calculation


  • Subject: Re: Simple calculation
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 25 Jan 2002 14:29:24 -0500
  • Organization: [very little]

> Date: Fri, 25 Jan 2002 12:08:19 +0000
> Subject: Simple calculation
> From: Rob Stott <email@hidden>
> To: <email@hidden>
>
> Heeeelp!
>
> Part of my script involves multiplying two figures using the simple lines;
>
> set theCost to "#" & (327.75 * 50)
>
> ...I get the result 1.63875E+4 which is all well and good but the script
> forwards the figure to our accountant who is foxed by figures that aren't in
> the format #16387.50
>
> Is there a way to do this? (Short of getting a smarter accountant...)

The easiest way is to use the format command from the free Satimage
scripting addition:

set x to "#" & (format (327.75 * 50) into "#####0.00")
-->"#16387.50"

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[1/25/02 2:27:07 PM]


  • Prev by Date: newbie ? re: Applescripting for MS Entourage
  • Next by Date: Re: Applescript editor recommendations?
  • Previous by thread: Re: Simple calculation
  • Next by thread: Re: Simple calculation
  • Index(es):
    • Date
    • Thread