Bug Hunting Session
Bug 54912 - BASIC: Array function forces the lower boundary for arrays as 0 in spite of option base 1
Summary: BASIC: Array function forces the lower boundary for arrays as 0 in spite of ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected) rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
Reported: 2012-09-14 09:29 UTC by pierre-yves samyn
Modified: 2019-08-29 23:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description pierre-yves samyn 2012-09-14 09:29:51 UTC

Steps to reproduce:

Run the code:

option Base 1
Sub ExampleOptionBase

Dim sVar(2) As String
msgbox LBound(sVar())
sVar = array(1,2,3)
msgbox LBound(sVar())
end sub

Expected results:  the two msgbox should display 1
Actual results: first displays 1, second displays 0

You need to use then the zero element: 
msgbox sVar(0)

This bug is old (already in OOo)
Platform: Version (Build ID: ba822cc) & Windows 7 64bits
Comment 1 Michel Rudelle 2013-01-22 11:52:07 UTC
I reproduce this bug:

Version (Build ID: 2ef5aff) - Vista
Version (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799) - Vista
Comment 2 QA Administrators 2015-02-19 15:36:11 UTC Comment hidden (obsolete)
Comment 3 pierre-yves samyn 2015-02-20 08:59:17 UTC

Still occurs on Windows 7/64 & Version:
Build ID: b5ac74bf8683a92078a2bc8aff97d4b436af63cb
Locale : fr_FR

Comment 4 QA Administrators 2016-02-21 08:34:32 UTC Comment hidden (obsolete)
Comment 5 Michel Rudelle 2016-02-21 13:47:34 UTC
This bug is still present on both versions (OS Vista-32b):

Build ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3
Locale : fr-FR (fr_FR)

Build ID: bcace328aabc4c8c10b56daa87da0a2ee6579b5a
Locale : fr-FR (fr_FR)
Comment 6 QA Administrators 2017-03-06 14:55:48 UTC Comment hidden (obsolete)
Comment 7 pierre-yves samyn 2017-03-18 06:49:10 UTC

Still reproduced on windows 7/64 & Version:
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: fr-FR (fr_FR); Calc: group

Comment 8 QA Administrators 2018-03-19 03:33:49 UTC Comment hidden (obsolete)
Comment 9 pierre-yves samyn 2018-03-19 08:22:56 UTC

Still occurs on Windows 7/64 with Version: (x64)
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 2; OS: Windows 6.1; UI render: default; 
Locale: fr-FR (fr_FR); Calc: group

Comment 10 QA Administrators 2019-05-23 02:49:58 UTC Comment hidden (obsolete)