Having problems with numberformat....
dsc at swcp.com
Wed Nov 1 23:26:26 EST 2006
On Nov 1, 2006, at 8:57 PM, David Bovill wrote:
> Well I am stuck. I have not idea why it does not work. I cannot
> pass these
> 12 place decimals as parameters and why the script below does not
> work beats
> me :(
By the way, the numberFormat setting is not needed for a level of
arithmetic accuracy. The result of arithmetic is always about 15
digits. The numberFormat comes into play the first time the result
of arithmetic is used as text.
The result of arithmetic will also pass as parameters just fine
(though converted to text with numberFormat coming into play when
passed using send).
Literals do not need the zeros out to 12 places.
So numberFormat is not used until the final result is put into the
message box. This should generate the same result:
put 0.006911491563 into projectedWidth
get -1 * projectedWidth
set the numberformat to "#.000000000000"
Maybe you have some similar handler in a front script or in a button
or something that is fooling with this.
More information about the Use-livecode