https://bugs.documentfoundation.org/show_bug.cgi?id=161315
Bug ID: 161315
Summary: 'Empty' can't be used as a default value for arguments
(Option Compatible)
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Consider the code:
Option Compatible
sub foo(Optional v As Variant = Empty)
MsgBox v
end sub
sub bar
foo
end sub
In MS Office (Word/Excel, indeed omitting the 'Option Compatible', which is
LibreOffice Basic compatibility flag), when running bar, it shows an empty
message.
In LibreOffice, this code doesn't compile, giving syntax error on the 'Empty'
default argument value; the same happens with 'Option VBASupport 1'. Replacing
the 'Empty' with other values, like '1' or '""', succeeds.
There is no reason why the 'Empty' shouldn't work here.
--
You are receiving this mail because:
You are the assignee for the bug.