> Hi!
> There's minor bug.
> Overflow with concatenate operator causes wrong error message.
> You can reproduce the bug with this code:
> 
> Dim ii As Integer
> Dim jj As Integer
> 
> For ii = 9 To 0 Step -1
> jj &= ii  <--- Wanted Integer got String instead.
> Next
> 
> Gambas 3 rev 2879 @ Ubuntu 9.10 64bit
> 
> Jussi
> 

I'd like to know what you expected exactly from that code, and what you think 
the error message should be!

For information, the previous code is equivalent to:

Dim ii As Integer
Dim jj As Integer

For ii = 9 To 0 Step -1
  jj = CInt(CStr(jj) & CStr(ii))
Next

The error message comes from CInt(). When its argument cannot be converted to 
an integer, it just says that there is a type mismatch (you forgot to tell 
that) and that its argument is not an integer.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to