| Summary: | ReDim on user type dynamic array member causes syntax error | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Oguz Meteer <oguz286> |
| Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | andreas.heinisch, himajin100000, mikekaganski, rafael.palma.lima, sokol, xiscofauli |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
|
Description
Oguz Meteer
2022-06-08 11:48:01 UTC
I ran a few tests and there seems to be something wrong here indeed.
First of all, I made a few corrections to the first example so it would run in Excel VBA as well. So I used the following code:
Option VBASupport 1
Type MyTyp
a() As String
End Type
Sub Main()
Dim typ As MyTyp
ReDim typ.a(0)
typ.a(0) = "Hello"
MsgBox typ.a(0)
End Sub
The code above runs fine in Excel VBA (excluding the 'Option VBASupport 1' line). It prints "Hello" as expected. However in LibreOffice it gives a syntax error, meaning it doesn't compile. It seems LO can't recognize "typ.a" as a symbol.
The following code runs fine in LO and MSO:
Sub Main2()
Dim typ As MyTyp
Dim aTemp() As String
Redim aTemp(0) As String
typ.a = aTemp
typ.a(0) = "Hello"
MsgBox typ.a(0)
End Sub
This indicates that there's some problem with syntax check for the ReDim command which does not accept user-defined types as symbols.
I'm setting this to NEW.
@Mike, maybe you have an opinion about this issue?
System info:
Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.21.10.1~lo1
Calc: threaded
(In reply to Rafael Lima from comment #1) I totally agree with your analysis. Dear Oguz Meteer, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug |