https://bugs.documentfoundation.org/show_bug.cgi?id=160321

            Bug ID: 160321
           Summary: On GoSub statement does not work properly
           Product: LibreOffice
           Version: 7.6.5.2 release
          Hardware: All
                OS: macOS (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: jeanpierresanchez0...@protonmail.com

Description:
The statement 'On expression GoSub' does not work properly. When expression is
0, the statement GoSub should not be executed. Actually it is executed on the
following line.
When statements GoSub are imbricated the next Return statement does not jump to
the proper line.

Steps to Reproduce:
Sub Main
Dim i As Integer
        GoSub Sub1
        Print i
Exit Sub
Sub1: 
        On 1 GoSub SubA, SubB
        i=i+1
        Return
SubA: Return
SubB: Return
End Sub

Actual Results:
2
Because the line i=i+1 is executed twice!

Expected Results:
1


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: BasicIDE
[Information guessed from browser]
OS: Mac OS X (All)
OS is 64bit: no

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to