[Gambas-user] Stange problem with CInt

Steven Lobbezoo steven at ...1652...
Fri Mar 7 18:20:38 CET 2008


No, that does not work either.

Val("123.00") 
returns NULL

But if I add Replace$("123.00", ".", ",")
it seems to work allright

Steven


Le vendredi 07 mars 2008 à 16:47 +0100, Ron Onstenk a écrit :
> On Friday 07 March 2008 13:41, Steven Lobbezoo wrote:
> > Hi,
> > 
> > I have a strange problem with CInt
> > 
> > I do :
> > i = CInteger("123.00")
> > 
> 
> use i = Cint(Val("123.00)) 
> maybe this helps
> 
> > where i is an integer and "123.00" a string of course
> > I tried Cint and CInteger
> > 
> > I get a message :
> > Type Mismatch : Wanted Integer, Got string instead
> > 
> > In the doc it says that the variable between the brackets is type
> > Variant.
> > 
> > I donnot get it, a variant can be a string no ?
> > 
> > I use 2.1.0 on Suse 10.3
> > 
> > Steven
> 
> Ron
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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