Bug 131818 - BASIC: Declaring an array parameter as optional should not be possible with option VBASupport
Summary: BASIC: Declaring an array parameter as optional should not be possible with o...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: easyHack
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2020-04-02 09:40 UTC by Andreas Heinisch
Modified: 2021-02-19 04:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Heinisch 2020-04-02 09:40:50 UTC
Description:
In LO BasicBasic with option Compatible/VBASupport it is possible to declare an array parameter as optional:

Function TestOptArray(Optional A() As Integer, Optional B() As Variant)

However, in MSO it is not possible to declare an array parameter as optional. The above code snippet leads to a syntax error in MSO, whereas the following works:

Function TestOptArray(A() As Integer, B() As Variant)

At least with option VBASupport LO should throw a syntax error.


Actual Results:
 

Expected Results:
 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Buovjaga 2020-06-20 13:59:25 UTC
I believe you, so I set to NEW