Re: Simple calculation
Re: Simple calculation
- Subject: Re: Simple calculation
- From: Emmanuel <email@hidden>
- Date: Fri, 25 Jan 2002 18:51:23 +0100
At 1:08 PM +0100 25/1/02, Rob Stott wrote:
>
...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
The (free) Satimage osax includes the following command:
---------------------------------------------------
format : format a real number using a specification string. Ex: format pi
into "##.##"->"3.14". "0" instead of "#" forces trailing zeros. "^" adds a
space. "+f1;-f2;f3" provides formats for numbers >0, <0, =0. Encapsulate
custom strings with "'".
format real -- the number
into string -- the formatting string, using #,^,O,.,%,',(,),+,-
Result : string -- the formated number
---------------------------------------------------
<
http://www.satimage-software.com>
Emmanuel