qb64
qb64 copied to clipboard
Array index can be omitted in cases where it's actually needed
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.
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.
Rabbit hole goes way deeper.