[Gambas-user] Wrong error message

mike euph1 at ...734...
Wed May 5 03:52:15 CEST 2010


On 05/04/2010 02:03 PM, Benoît Minisini wrote:
>>> I feel something weird in using an integer variable as if it was a
>>> string, and the above snippet does that.
>>>        
>>   As I said earlier, it is sometimes useful. Datatype is integer because
>>   all other usage of that variable is mundane math.
>>   But of course there are many other ways to do same thing.
>>   Example;
>>   n += i * exp10(i)
>>   Or using temporarily string variable for concatenate and then convert
>> back to integer.
>>   But I'm accustomed to use most simplest expression n&= i.
>>
>>   BTW. 5*exp10(5) gives 500000.000000001 weird?
>>      
> On my 32 bits Mandriva, I get 500000, both with Gambas 2 and Gambas 3. Could
> other 64 bits users confirm that?
>
>    
Fedora 11
Kernel 2.6.30.10-105.2.23.fc11.x86_64
Intel Core2 Quad Q6700
Gambas 2.19

? 5*exp10(5)
500000.000000001



More information about the User mailing list