[Gambas-user] Re: BUG

Benoit Minisini gambas at ...1...
Sun Oct 10 19:31:20 CEST 2004


On Thursday 07 October 2004 11:54, you wrote:
> Hi,
>
> I think that I found a small bug in Format$() described below.
>
> I am using SuSE 9.1 with kernel 2.6.9-rc3.
>
> Best regards,
>
> Bernd Edler
>
> --------
>
> A small test program:
>
> ' Gambas module file
>
> PUBLIC SUB Main()
>
>    x AS Float
>
>    x = 1.01
>    WHILE x>0.99
>      x = x / 1.001
>      PRINT Format$(x,"0.##"),x
>    WEND
> END
>
> gives the following output:
>
> 1.01	1.008991008991
> 1.01	1.007983025965
> 1.01	1.006976049915
> 1.01	1.005970079835
> 1	1.004965114721
> 1	1.003961153567
> 1	1.002958195372
> 1	1.001956239133
> 1	1.000955283849
> 0.1	0.99995532852
> 0.1	0.998956372148
> 0.1	0.997958413734
> 0.1	0.996961452282
> 0.1	0.995965486795
> 0.99	0.994970516279
> 0.99	0.993976539739
> 0.99	0.992983556183
> 0.99	0.991991564618
> 0.99	0.991000564054
> 0.99	0.990010553501
> 0.99	0.989021531969

Thanks for the report. I join an interpreter patch that seems to fix the bug. 
I send your mail to the mailing-list - other people might be interested.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbx_local.c
Type: text/x-csrc
Size: 21568 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20041010/62392c3c/attachment.c>


More information about the User mailing list