[Gambas-user] Bug / changed behaviour of Input
Jussi Lahtinen
jussi.lahtinen at ...626...
Wed Mar 14 19:46:33 CET 2012
> That's the difference, If you pass the string "1234" to Read As Integer,
> you get the Integer 875770417, because "1234" is in ascii 49 50 51 52, and
> 49 + 50*(2^8) + 51*(2^16) + 52*(2^24) = 875770417.
>
True. I'm slow today. Maybe it's my fever, but I just can't lay down doing
nothing. Makes me bored to tears.
If Input only returns the raw string, the user can do the Val on his/her
> own afterwards, if he/she wants to.
> In most cases (if Input simply returns the raw string),
> Dim a As Integer
> Input a
> is good, because Input returns a String, and correct string to int
> conversion is done automatically.
>
I agree. Now we need to convince Benoit...
Jussi
More information about the User
mailing list