You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/06/24 01:40:55 UTC
[Bug 120069] New: [StarBasic] Typed parameters are copied instead of
referenced
https://issues.apache.org/ooo/show_bug.cgi?id=120069
Priority: P3
Bug ID: 120069
Assignee: ooo-issues@incubator.apache.org
Summary: [StarBasic] Typed parameters are copied instead of
referenced
Severity: major
Issue Type: DEFECT
Classification: Code
OS: All
Reporter: villeroy@t-online.de
Hardware: All
Status: UNCONFIRMED
Version: AOO 3.4.0
Component: code
Product: api
Sub Test
x=-1
in_out x
print x
REM should print 13, prints -1
End Sub
Sub in_out(x as integer)
x=13
End Sub
This does not make any difference and should not since ByRef is the default:
Sub in_out(ByRef x as integer)
This makes a difference. Caller prints 13:
Sub in_out(x)
I'd consider this as a regression since it breaks old Basic macros.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 120069] [StarBasic] Typed parameters are copied instead of
referenced
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120069
bmarcelly <ma...@club-internet.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marcelly@club-internet.fr
--- Comment #2 from bmarcelly <ma...@club-internet.fr> ---
It also works correctly if you are consistent in _not_ declaring types:
Sub Test
x=-1
in_out x
print x
REM prints 13
End Sub
Sub in_out(x)
x=13
End Sub
IMHO the origin is same as described in Bug 64746 (classified as WONTFIX).
It is not a regression of 3.3 or 3.4, but a much older regression.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 120069] [StarBasic] Typed parameters are copied instead of
referenced
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120069
brinzing <ol...@gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oliver.brinzing@gmx.de
--- Comment #1 from brinzing <ol...@gmx.de> ---
with "Dim x as Integer" it the result is always 13
OPTION EXPLICIT
Sub Test()
Dim x as Integer
x=-1
in_out(x)
print x
REM prints 13 in OO 3.2 / AOO 3.4
End Sub
Sub in_out(x as integer)
x=13
End Sub
--
You are receiving this mail because:
You are the assignee for the bug.