[Gambas-devel] Type mismatch: wanted Byte[], got Integer[] instead

Benoît Minisini gambas at ...1...
Sat Nov 27 02:30:22 CET 2010


> Hi,
> 
> "Type mismatch: wanted Byte[], got Integer[] instead"
> 
> I get the above error on the following code line while running my
> project... is this expected behavior or did I miss something?
> 
> Dim b1 As Byte[] = [CByte(&HF0), CByte(&H33), &HF0, &H33]
> 
> Worked with Gambas2.
> 
> The following changes seems to fix it, but what an overhead...
> 
> Dim b1 As Byte[] = [CByte(&HF0), CByte(&H33), CByte(&HF0), CByte(&H33)]
> 
> 
> Now running Gambas3 rev 3098 on Ubuntu 10.04
> 
> Regards,
> Ron.
> 

Hi,

I added an automatic conversion between all array classes in revision 3325.

So now you can write: 

	Dim b1 As Byte[] = [&HF0, &H33, ...]

And it will do what you expected.

Regards,

-- 
Benoît Minisini




More information about the Devel mailing list