[Libreoffice-bugs] [Bug 134712] Redim Preserve for existing arrays is accepted without any index range, but acts differently as if the unchange index ranges are made explicit.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 10 16:57:06 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=134712

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Mike Kaganski <mikekaganski at hotmail.com> ---
The code like

> ReDim Preserve B

gets compiled out (so it can't even have a breakpoint). That happens in
SbiParser::DefVar, where the call to VarDecl naturally sets pDim (the
dimensions list) to nullptr, and then if( pDim ) conditions are false.

I don't think we should change that. To allow copying arrays, it's better to
implement proper ByValue semantics for them (which is allowed in SB, but is not
respected). Additionally, in other BASIC flavors, this is a syntax error (e.g.,
VBA); I don't think we also should make it an error: that could break something
existing, while the status quo is harmless.

Closing WONTFIX. But possibly we should mention the noop variant in the help.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200710/134bd730/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list