[Gambas-user] Bug / changed behaviour of Input

Emil Lenngren emil.lenngren at ...626...
Thu Mar 15 00:30:44 CET 2012


Yeah :)

2012/3/15 Benoît Minisini <gambas at ...1...>

> Le 14/03/2012 19:46, Jussi Lahtinen a écrit :
> >> 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
>
> I agree that the current behaviour of Input is useless. As I didn't use
> Input at all, I didn't really care.
>
> Now we must agree about how Input can be really useful.
>
> At the moment, I am more with Emil : just read strings separated by
> spaces. The conversion will be done by the datatype of the destination
> variable.
>
> This implies that the input of Input (funny) is not localized, and so
> Gambas 3.1 will not be compatible with Gambas 3.0.
>
> As Gambas 3.0 programs should run unchanged with Gambas 3.1, we are
> breaking the rule.
>
> I will do the change, hope that nobody relies on the current Input
> behaviour, and see if someone complains. As usual. :-)
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> 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