Apache OpenOffice (AOO) Bugzilla – Issue 30500
StarBasic's IsMissing fails on multiple missing Variables
Last modified: 2013-02-24 21:09:37 UTC
Start StarBasic-IDE. Create a Modul. Paste this code into it and run it. -----------------------------8<---------------------------- Sub Main ASubroutine End Sub Sub ASubroutine(Optional vOpt1 as Variant, Optional vOpt2 as Variant) MsgBox IsMissing(vOpt2) MsgBox IsMissing(vOpt1) End Sub -----------------------------8<---------------------------- The second MsgBox-Call incorrectly returns False. A workaround is to use the call ASubroutine(,) in the Main routine. The problem probably exists on all Platforms, however I only testet it on PC/WiXP SO7.645
SW->AB: seems to be one for you
SW->gerald_huber: as workaround you could ask "IsMissing" in the same sequence as the parameters appear in the function -----------------------------8<---------------------------- Sub Main ASubroutine End Sub Sub ASubroutine(Optional vOpt1 as Variant, Optional vOpt2 as Variant) MsgBox IsMissing(vOpt1) MsgBox IsMissing(vOpt2) End Sub -----------------------------8<---------------------------- works just fine for me :-)
gerald_huber --> SW: Evaluating the parameters in the same sequence in which they appear does indeed work, however I stumbled over this behaviour with a subroutine in which 1) I didn't want to change the order of the parameters, because the second one was in some sense "more" optional then the first 2) I wanted to evalute the second parameter first, because for some values of it, I don't have to evaluate the first at all At least it should be documented somewhere.
Accepted
*** Issue 32917 has been marked as a duplicate of this issue. ***
Fixed
ab: According to discussion with kso/sw -> 2.0.3
-> tbo re-open issue and reassign to tbo@openoffice.org
reassign to tbo@openoffice.org
reset resolution to FIXED
OK in cws ab19; verified
integrated in src680m163 close