https://bugs.freedesktop.org/show_bug.cgi?id=57308
Priority: medium
Bug ID: 57308
Assignee: [email protected]
Summary: Basic IDE: watching of variable not working if
variable is returning value of function
Severity: minor
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: All
Status: UNCONFIRMED
Version: 3.4.2 release
Component: BASIC
Product: LibreOffice
Basic IDE problem: If we place variable which returns value from function to
Watch window, it not working. Always tells "Out of scope"
Steps to reproduce:
0. Start any LO module, for example, Writer
1. Press Alt-F11, in dialog "LibreOffice Basic Macros" press "New" and then
"Ok"
2. In Basic IDE enter something like this:
Sub Main
c=MySum(1,2)
End Sub
Function MySum (a as Integer, b as Integer)
MySum=0
MySum=a+MySum
MySum=MySum*10
MySum=b+MySum
End Function
3. Place cursor on word MySum and press F7. This variable added to Watch window
4. Place cursor on line where is MySum=0 and press F9. BreakPoint added
5. Place cursor on line where Sub Main and press F5
6. Press F8 several times and see on Watch window
Expected: value of variable MySum is shown
Actually: always "Out of scope"
reproduced in 3.4.2 on Windows XP 32 bit and in 3.6.3 on RFR 17 64 bit
Workaround: create new variable and use it for all calculations, then assign
result to returning variable in last line of function
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs