[Gambas-user] Bugs with conversion functions
Emil Lenngren
emil.lenngren at ...626...
Sat Nov 3 20:59:47 CET 2012
It's the same in VB. If you run CInt("some string") you get the same error
message. I think it's better to throw an error message rather than
returning 0 or something...
/Emil
2012/11/3 Jussi Lahtinen <jussi.lahtinen at ...626...>
> > First, a void string has never been a number.
> >
>
> Yes, but, why "Type mismatch: wanted Integer, got String instead"?
> "0" is also *string* and it is accepted.
>
> Also booleans are accepted and interpreted as False = 0, True = -1, which
> is not the way Boolean algebra works.
> But that is OK, because it is the usual way things work in computers.
>
> So I don't think my question was so far fetched.
>
>
>
> 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.
> >
>
> OK.
>
>
> Jussi
>
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list