qb64 icon indicating copy to clipboard operation
qb64 copied to clipboard

Array index can be omitted in cases where it's actually needed

Open flukiluke opened this issue 3 years ago • 2 comments

This should generate an error about no array index, yet is accepted:

Dim b(4)
b() = 100

The runtime behaviour is as-if the index were 0 - which is clearly a side-effect rather than a desired behaviour.

flukiluke avatar Jan 06 '22 13:01 flukiluke

I would like to mention a bug i found a while ago but forgot to make a report, and i think its relevant here:

When you do Array1() = Array2(), it throws no errors and you are led to think that it sets Array1() to the contents of Array2(), but this is not the case.

aouwt avatar Jan 06 '22 14:01 aouwt

Rabbit hole goes way deeper.

FellippeHeitor avatar Mar 02 '22 02:03 FellippeHeitor