Re: Simple calculation
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]