[Libreoffice-bugs] [Bug 143706] New: Missing Optional argument is not properly missing, when ':=' syntax is used

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 3 14:55:11 UTC 2021


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: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com
                CC: andreas.heinisch at yahoo.de

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210803/80a5931a/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list