[Libreoffice-bugs] [Bug 125180] Bad behaviour in BASIC procedure with several optional parameters.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Mar 5 16:10:46 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=125180
--- Comment #10 from Andreas Heinisch <andreas.heinisch at yahoo.de> ---
(In reply to Mike Kaganski from comment #9)
> (In reply to Andreas Heinisch from comment #8)
> > I investigated the error and I think I need some clarifications:
> >
> > - in VB the function IsMissing works only with variant datatypes
> > - in LO IsMissing works or should work even with other datatypes?!?
>
> Why are you asking? You have just fixed tdf#36737 ;-)
The more I work with these optionals/missing parameters, the more I get
confused hahaha, but I found many RefCards, where it states, that it should
work with every datatype, whereas in VB it works only with Variants.
>
> > In the
> > majority of the cases it works :). I does not work in the case, where the
> > missing parameter is before any non missing parameters, e.g.,
> > SubTwoParameters(,2)
>
> When you fixed the mentioned bug, in SbiRuntime::StepPARAM there was initial
> part assigning error 448 to missing previous arguments. That looks relevant.
> There should be a difference somewhere that treats actually missing
> parameter differently compared to error 448.
The thing is that the parameter already has a value in StepPARAM, because it
has been converted from Error to Int. In SbiRuntime::StepEMPTY() it gets the
error value
(https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=8e323fca#2744)
and later it will be converted to the specified type, for instance in
https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxuint.cxx?r=4fdc90c5#53.
I will search for a fix ...
--
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/20200305/ac730904/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list