fxm wrote: ↑Nov 16, 2024 21:24
REDIM syntax bug in working version 1.20, for a procedure pointer array member and its access via pointer
...
No problem with LBOUND/UBOUND or ERASE.
Hey there, fxm. Thanks for the report. I looked at this yesterday because it reminded me of a different bug I was looking at - a syntax problem with indexed PROPERTY arrays returning byref objects and getting confused parsing parens - but it is not related.
Yes, there is no problem with LBOUND/UBOUND or ERASE because the parser never expects any left paren '(' after the array name or array expression name, so there is no ambiguity.
There is ambiguity with REDIM because the paren '(' could either be a continuation of the array expression as an array index or the beginning of the '(lower [to upper])' bounds.
I experimented with fixing this REDIM bug and I believe only way to fix will be allowing syntax using parens to wrap the array expression.
REDIM (array-expression-name)(lower [to upper])
Probably within the context of parsing REDIM specifically, because I think used anywhere else the array-expression-name should expect index to follow (except LBOUND/UBOUND or ERASE)