After the topic was discussed at
https://www.qb64.org/forum/index.php?topic=3182.msg124506#msg124506, this new feature has finally made it into the development build.
(Get the dev build generated on 2021-01-26, from git 35e7b22 at
https://www.qb64.org/portal/development-build/)
I ask you faithful beta-testers to help me find bugs with the new syntax. With it, this:
can be simplified into:
The same improvement is valid for REDIM, STATIC, COMMON, SHARED as variable-declaring statements. It has also been extended to TYPE. With it, this:
can be simplified into:
I did extensive testing locally, but you guys sure can help find approaches I didn't think of. Please let me know if any issues arise as this is the first implementation and, of course, bugs are prone to to have been introduced.
Notice that the traditional syntax remains unchanged and can co-exist with the new syntax freely.
Also, notice that when you use
DIM AS type variable-list, you cannot have another AS type clause in the same line.
The new feature won't touch SUB/FUNCTION parameters.
Looking forward to getting results back from your testing.