Summary: | Redim with function name | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | ge.huber |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | QA Contact: | |
Severity: | minor | ||
Priority: | medium | CC: | lgodard.libre, todventtu |
Version: | 4.2.6.3 release | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Nothing new here. Textfile with the code from the description. |
I confirm the error. Version: 4.4.0.0.alpha1+ Build ID: 0a82645c360158f9cc0fdabe2a52f1ff8f981bed TinderBox: Win-x86@39, Branch:master, Time: 2014-10-24_06:59:23 There seem to be more problems with using the function name as a variable inside the function. It can not be used as the loop variable in a For ... Next loop. Sub Main Print foob() Print fool() End Sub 'This surrogate works Function foob() As long foob = 1 LoopLable: Print foob foob = foob + 1 If foob < 4 Then Goto LoopLable End Function 'While the For ... Next doesn't Function fooc() As long For fooc = 1 To 3 Print fooc Next fooc End Function |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 108304 [details] Nothing new here. Textfile with the code from the description. Trying to Redim a field inside a function with the function name fails with an "Reading Error. Property is read only"-error. Run this code, to see the error: Sub Main Dim FieldOfLongs() As Long Dim l As Long l = foo(FieldOfLongs) End Sub Function foo(FieldOfLongs() As Long) As Long Print "foo ist actually " & foo Dim Zero As Long Redim FieldOfLongs(Zero) As Long 'Redim works Redim FieldOfLongs(foo) As Long 'Redim fails with error End Function The expected behaviour is, that the function name should behave just like any other variable within the function. Problem arises on Lubuntu 14.04 with Version: 4.2.6.3 Build-ID: 420m0(Build:3) The error actually says "Lesefehler. Eigenschaft ist schreibgeschützt" in my Germann version of LO.