To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=17948





------- Additional comments from [EMAIL PROTECTED] Mon Jan 31 04:29:38 -0800 
2005 -------
It's very simple, my example is wrong. The private state does not depend on the
"Option Compatible" but on the compatibility runtime mode. CompatibilityMode
( true )". This looks strange - and that's why I ran into my own trap I guess - 
but 
that's how it's realised. OOo Basic always searches for symbols at runtime and
only decides after finding the private symbol in another module that this symbol
is private and cannot be accessed. Solving this on compiler level would have re-
quired major changes in the Basic core that I did not want to do.

So this is the correct code:

REM  *****  Module1  *****
Private myText As String

Sub initMyText
        myText = "HellOoo"
        print "in module1 : ", myText
End Sub

REM  *****  Module2  *****
'Option Explicit

Sub demoBug
        CompatibilityMode( true )
        initMyText
        
        ' Now returns empty string
        ' (or rises error for Option Explicit
        print "Now in module2 : ", myText
End Sub



---------------------------------------------------------------------
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]

Reply via email to