To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=64746
                  Issue #:|64746
                  Summary:|Basic pass by reference concept has changed from 1.1
                          |to 2.0
                Component:|scripting
                  Version:|OOo 2.0.2
                 Platform:|All
                      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] Tue Apr 25 05:13:14 -0700 
2006 -------
By default, in Basic parameters are passed by reference, so if you modify the 
value of 
the argument inside the routine this will change the value of the passed 
variable.

Some users have found that the behaviour has changed from versions 1.1 to 2.0. 
This 
means some routines will not work as expected and bugs arise when upgrdading to 
2.0.
Next attachment contains 4 cases (each in a Basic module). Only Case 2 is 
identical 
between 1.1 and 2.0.

Case 1 : variable is Variant, routine parameter is String
- OOo 1.1 the passed variable is modified by the routine
- OOo 2.0.2 the passed variable is not modified


Case 2 : variable is a non-Variant type, parameter is Variant
- OOo 1.1 the passed variable is modified by the routine; within the routine 
the 
parameter has the type of the passed variable
- OOo 2.0.2  same behaviour – no bug here -


Case 3 : variable is a non-Variant type, parameter is another non-Variant type
- OOo 1.1 the passed variable is NOT modified by the routine, and the parameter 
is NOT 
modified within the routine, even if the variable is of a compatible type
- OOo 2.0.2 the passed variable is NOT modified by the routine, but the 
parameter can 
be modified inside the routine

Case 4 :  variable is Variant by default, routine parameter is Long (same bug 
as Case 
1)
- OOo 1.1 the passed variable is modified by the routine
- OOo 2.0.2 the passed variable is not modified

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