Re: Decimal Point Truncations?
Re: Decimal Point Truncations?
- Subject: Re: Decimal Point Truncations?
- From: Lee Hoong <email@hidden>
- Date: Thu, 08 Feb 2001 13:37:11 -0500
>
Hello,
>
>
I'm having a problem truncating decimals. Can anyone help?
>
>
Example:
>
>
set diskSize to free space of startup disk
>
--> script code to recalculate diskSize variable to Gb <--
>
display dialog diskSize
>
>
I want to get the disk size and display the result in Gb with one decimal
>
place (If possible). Currently, the full code above gets something like
>
54.6464646748783838. I would like it to display 54.6. I've tried rounding
>
and it returns the same 54.6464646748783838 for some reason that escapes me.
>
>
As always, thanks in advance!
>
--
>
>
Cheers,
>
Greg Smith
Use the Format Number function from GTQ OSAX.
Example:
format number 35.63728 in format "##.##"
--> 35.64
Lee.
-----------------------
Lee Hoong, Ph. D.
Associate Director
Medicinal Chemistry Group
AtheroGenics, Inc.