[Gambas-user] Wrong error message

Benoît Minisini gambas at ...1...
Tue May 4 20:03:15 CEST 2010


> > 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?

-- 
Benoît Minisini




More information about the User mailing list