[Gambas-user] about IsFloat and IsInteger behaviour...

Christopher Brian Jack brian at ...1334...
Sun May 14 02:58:03 CEST 2006


On Sat, 13 May 2006, Benoit Minisini wrote:

Isn't there like a CInt() or something when you really need an
integer-typed result?

> Date: Sat, 13 May 2006 20:18:46 +0200
> From: Benoit Minisini <gambas at ...1...>
> Reply-To: gambas-user at lists.sourceforge.net
> To: gambas-user at lists.sourceforge.net
> Subject: Re: [Gambas-user] about IsFloat and IsInteger behaviour...
>
> On Thursday 11 May 2006 15:45, Stefano Palmeri wrote:
> > Hi all.
> >
> > It's a lot of time from my mathematics studies at school, so excuse the
> > stupid question...
> >
> > Please, could someone explain to me this Gambas behaviour?
> >
> > ------------------------------
> > PRINT IsFloat (Int(4 / 2))
> > --> True ?
> >
> > PRINT IsFloat(2)
> > --> False
> > ------------------------------
> >
> > ------------------------------
> > PRINT IsInteger(3.5)
> > --> False
> >
> > PRINT IsInteger(Int(3.5))
> > --> False ?
> > ------------------------------
> >
> > Thanks in advance for any answer.
> >
> > Regards,
> >
> > Stefano Palmeri
> >
> > Gambas 1.0.14
> > Gambas 1.9.28
> >
>
> Because Int() is implemented as always returning a floating point number. The
> IsXXX() functions test the Gambas datatype of an expression, not its real
> type in the real life!
>
> Regards,
>
> --
> Benoit Minisini
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| brian _AT_ brians-anime _DOT_ com
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...




More information about the User mailing list