Issue 30500 - StarBasic's IsMissing fails on multiple missing Variables
Summary: StarBasic's IsMissing fails on multiple missing Variables
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P4 Trivial
Target Milestone: ---
Assignee: b.osi.ooo
QA Contact: issues@api
URL:
Keywords:
: 32917 (view as issue list)
Depends on:
Blocks:
 
Reported: 2004-06-20 15:23 UTC by gerald_huber
Modified: 2013-02-24 21:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description gerald_huber 2004-06-20 15:23:19 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
Comment 1 stephan.wunderlich 2004-07-06 12:16:52 UTC
SW->AB: seems to be one for you
Comment 2 stephan.wunderlich 2004-07-06 15:17:39 UTC
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 :-)
Comment 3 gerald_huber 2004-07-07 07:06:18 UTC
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.
Comment 4 ab 2004-07-28 08:53:28 UTC
Accepted
Comment 5 stephan.wunderlich 2004-08-13 09:31:40 UTC
*** Issue 32917 has been marked as a duplicate of this issue. ***
Comment 6 ab 2005-08-10 09:53:46 UTC
Fixed
Comment 7 ab 2006-03-09 14:47:21 UTC
ab: According to discussion with kso/sw -> 2.0.3
Comment 8 ab 2006-03-24 14:18:02 UTC
-> tbo


re-open issue and reassign to tbo@openoffice.org
Comment 9 ab 2006-03-24 14:18:06 UTC
reassign to tbo@openoffice.org
Comment 10 ab 2006-03-24 14:18:14 UTC
reset resolution to FIXED
Comment 11 b.osi.ooo 2006-04-04 19:51:45 UTC
OK in cws ab19;  verified 
Comment 12 b.osi.ooo 2006-04-13 18:16:01 UTC
integrated in src680m163

 close