05-17-2022, 06:06 PM
Code: (Select All)
'$dynamic
foo b(), 100
Print UBound(b)
Sub foo (A(), limit)
Dim A(limit)
End Sub
Is this what the code looks like? Like this, I can reproduce the results you mention, but it's not a bug. It's literally what it says it is: A duplicate definition.
SUB foo (A() <-- here we define the dynamic array A().
DIM A(limit) <-- and here we try to define the dynamic array A().
If that dim becomes a REDIM, everything works as expected for me.
Unless I'm missing something here.