https://bugs.documentfoundation.org/show_bug.cgi?id=133811
Mike Kaganski <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS|Linux (All) |All
CC| |[email protected]
Hardware|x86-64 (AMD64) |All
--- Comment #1 from Mike Kaganski <[email protected]> ---
This is not specific to one-line If. In the code of comment 0, Test_IfIsClosed
only tests the k variable that gets Dim'ed in "true" branch; but trying to
MsgBox j there instead of MsgBox k also gives the same "Variable not defined."
run-time error.
But I am unsure that the "Expected Results" from comment 0 ("Dim or ReDim
should be executed") are correct. Dim is not a run-time operator - it is
compile-time instruction. It should, naturally, be effective regardless of
conditions; but in fact, the line
> If False Then Dim i%
should be syntax error (since it's equal to this *incomplete* run-time
instruction: "If False Then"). It *is* syntax error in, say, VBA (tested in
Excel 2016).
Alternatively, it should be tolerated in non-VBA mode (to keep backward
compatibility with strange StarBasic code using it?), and then the "Expected
Results" is OK (but should be made syntax error in "Option VBASupport 1" mode).
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs