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

Andreas Heinisch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #13 from Andreas Heinisch <[email protected]> ---
After some investigation, here are my findings. Consider the following code
snippet:

Sub Main()

Dim strArray(2) As String

MsgBox LBound(strArray)
MsgBox UBound(strArray)
MsgBox UBound(strArray, 1) - LBound(strArray, 1) + 1

Redim strArray(3)
MsgBox LBound(strArray)
MsgBox UBound(strArray)
MsgBox UBound(strArray, 1) - LBound(strArray, 1) + 1

End Sub

Without any option:
    - the array starts at 0 and ends at 2 with 3 elements.
    - after the redim the array starts at 0 and ends at 3 with 4 elements.

With option base 1:
    - the array starts at 1 and ends at 3 with 3 elements, since this option
increases also the upper bound (see #109275 in 
https://jezzper.com/jezzper/discussions.nsf/0/3C030B7CC3F24D5FC1256F65002BC1B5)
    - after the redim the array starts at 1 and ends at 4 with 4 elements.

With option base 1 and option compatible:
    - the array starts at 1 and ends at 2 with 2 elements, since option
compatible does not change the upper bound
    - after the redim the array starts at 1 and ends at 3 with 3 elements.

At the moment, the option base is not fully implemented and works only with the
additional VBASupport option.

-- 
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

Reply via email to