https://bugs.documentfoundation.org/show_bug.cgi?id=143706
Bug ID: 143706
Summary: Missing Optional argument is not properly missing,
when ':=' syntax is used
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Consider this BASIC code:
' No Option VBASupport
Sub Foo(Optional x As Double, Optional y As Double)
MsgBox ismissing(x) & " " & ismissing(y)
End Sub
Sub Bar
Foo(y:=10)
End Sub
It produces "False False", instead of expected "True False"; and inspecting
value of x inside Foo gives 0.
In non-VBASupport mode, we should not initialize missing optional arguments;
the problem looks specific to the := argument value syntax, and e.g.
Foo(, 10)
produces expected "True False".
Tested with Version: 7.2.0.2 (x64) / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.