[Gambas-user] Integer BUg Re Argggggghhhhhhh

Fabien Bodard gambasfr at ...11...
Thu Nov 13 15:15:55 CET 2003


hi Olivier, Ahmad, Nelson, an others
in fact in gambas you must to have at less one float number in operation to
have a float result.

so
i as interger
s as integer
i = 4
s = 2
print i/s  => give 5

i as interger
s as float
i = 4
s = 2
print i/s  => give 4.5

i as interger
s as integer
i = 4
s = 2
print i/CFloat(s)  => give 4.5

Fabien Bodard

In fact i think it's to give more velocity (speed) to the interpreter.

----- Original Message -----
From: "Nelson Ferraz" <nferraz at ...184...>
To: <gambas-user at lists.sourceforge.net>
Sent: Thursday, November 13, 2003 1:04 PM
Subject: Re: [Gambas-user] Integer BUg Re Argggggghhhhhhh


> Ahmad Kamal wrote:
>
> > Benoit asserted that this is the desired functionality in the docs,
> > although I agree, that 9/2 SHOULD give 4.5.
>
> In Python and Ruby, "print 9/2" gives 4.
> In Perl and JavaScript, it gives 4.5.
>
> It seems to be a design decision.
>
> --
> []s
>
> Nelson
>
> ________________________________________________________________
> Nelson Ferraz
>
> GNU BIS: http://www.gnubis.com.br
> PhPerl:  http://www.phperl.com
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list