[Gambas-user] Bug with conversion?

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Feb 10 21:07:27 CET 2021


There seems to be a case where Gambas does extra conversions or maybe I'm
missing something. See attachment.

Look at the improved ArrayBoundsTest() function.

>From these lines:
Debug gb.Integer
Debug TypeOf(iMyArray1.Bounds.Count);; TypeOf(iMyArray2.Bounds.Count);;
TypeOf(iMyArray3.Bounds.Count);; TypeOf(iMyArray4.Bounds.Count)
Debug [iMyArray1.Bounds.Count, iMyArray2.Bounds.Count,
iMyArray3.Bounds.Count, iMyArray4.Bounds.Count]

This is what I get:
mTest.ArrayBoundsTest.2548: 4
mTest.ArrayBoundsTest.2549: 4 4 4 4
mTest.ArrayBoundsTest.2550: (Variant[] 0x559e6c3b9178)

I would expect integer[].


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210210/cf8479bc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GambasTestercmd-0.10.24.tar.gz
Type: application/gzip
Size: 30192 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210210/cf8479bc/attachment-0001.gz>


More information about the User mailing list