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


User frahan changed the following:

                  What    |Old value                 |New value
================================================================================
                    Status|CLOSED                    |UNCONFIRMED
--------------------------------------------------------------------------------
                Resolution|WORKSFORME                |
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Mon Jan  2 05:30:05 -0800 
2006 -------
Yes you are right. In that case, the variable kept it's value, but I ment
something different. For example, if I create an spreadsheet with two buttons.
The first Button is called init and the button-pressed-event is connected to the
procedure init1. The second button is called show and is connected to the
procedure show. In this case I would assume, that the content of a static
variavble is kept as long the spreadsheet is open. The declaration is made
inside this spreadsheet.

When the Button init is pressed, the varibale is initialized with 1. If the
second button ist pressed, the content of the varable ist zero.

sub init1
test1(1)
end sub

sub show
test1(3)
end sub


sub test1( iMode as integer )

    select case iMode
    case 1 : 
        static x as integer
        x = 1
        print "X initialized as: " & x 
    case 2 :
        x = 2
        print "X assigned: " & x
    case 3 :
        print "X = " & x
    end select
    
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