Re: [Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Patrik Karlsson
2014-05-31 17:49 GMT+02:00 Jussi Lahtinen : > Oh, in this case use IsInteger(). > > Jussi > > Got it, thanks! -- Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/r

Re: [Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Jussi Lahtinen
It's correct, NULL is not same as zero. I suggest you use IsNumber() to determine if the string can be converted. Jussi On Sat, May 31, 2014 at 12:48 PM, Patrik Karlsson wrote: > Should not CInt("") return 0? > > Print cint("") > Type mismatch: wanted Integer, got String instead > > /Patrik >

Re: [Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Jussi Lahtinen
Oh, in this case use IsInteger(). Jussi On Sat, May 31, 2014 at 6:48 PM, Jussi Lahtinen wrote: > It's correct, NULL is not same as zero. > I suggest you use IsNumber() to determine if the string can be converted. > > Jussi > > > On Sat, May 31, 2014 at 12:48 PM, Patrik Karlsson > wrote: > >>

Re: [Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Fabián Flores Vadell
I think that the result is correct. ?Cint("0") 0 Try this in the gambas console to see how Gambas evaluate empty strings: ? if("", "Hola", "aloH") aloH ? ["Item":Null].count 0 ? ["Item":""].count 0 ?isnull("") True 2014-05-31 6:48 GMT-03:00 Patrik Karlsson : > Should not CInt("") return 0? >

[Gambas-user] CInt("0") <> CInt("")

2014-05-31 Thread Patrik Karlsson
Should not CInt("") return 0? Print cint("") Type mismatch: wanted Integer, got String instead /Patrik -- Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet