To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=70616 Issue #|70616 Summary|Basic finds inexistent runtime error before running th |e code Component|scripting Version|OOo 2.0.4 Platform|PC URL| OS/Version|Windows XP Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|kr Reported by|bmarcelly
------- Additional comments from [EMAIL PROTECTED] Thu Oct 19 11:08:39 -0700 2006 ------- Problem found on OOo 2.0.4 and 1.1.5. The following example of Basic subroutine cannot be called: Sub tata2(a As Variant, d As Long) if d=0 then print a.xx else print "OK" end if End Sub When you call this routine with a code like: tata2(5,1) you get this message: Basic runtime error. Object variable not set. And Basic shows in the IDE the first line of the sub: Sub tata2(a As Variant, d As Long) All this is absolute non-sense: Basic is complaining in fact about handling variable "a" as an object in an instruction which is not executed. And it does not show the incriminated instruction! In a real programming situation it can be very difficult to find the origin of the problem in a big and complex sub. Next attachment is a Basic example. A workaround is to use an intermediate variable to fool the interpreter. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
