Le 03/11/2012 16:24, Jussi Lahtinen a écrit :
> If I remember correctly this has been topic earlier... Was there some
> reason why Null is not accepted..?
>
> ? cint("0")
> 0
> ? cint("")
> Type mismatch: wanted Integer, got String instead
>
> At least error message is wrong (expected is variant).
> And I expect it to return zero.
>
>
> ? val("&H123123")
> 1192227
> ? cint("&H123123")
> Type mismatch: wanted Integer, got String instead
>
> Again at least error message is wrong. I expect it to return same as Val().
>
>
> These errors seems to apply to other conversion functions as well.
>
>
> Gambas 3 rev 5289 @ Xubuntu 12.04 64bit
>
> Jussi

If Gambas does not work like you think, it is not necessarily a bug.

First, a void string has never been a number.

As CInt() being unabled to understand the "&H..." syntax, I prefer that 
because it avoid many unexpected bugs that usually find with libc 
conversion functions.

I suggest you read the documentaion about CInt(), Val() and other 
conversion functions carefully.

-- 
Benoît Minisini

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to