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

            Bug ID: 150458
           Summary: Incorrect calculation of the boundaries of the For
                    loop
           Product: LibreOffice
           Version: 7.3.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: so...@comec92.ru

Run macro:

Option Explicit
Sub test
  Dim i As Long, j As Long, k As Long
  k=10
  For i=1 To k
    k=1
    j=i
  Next i

  Msgbox j
End Sub    

Shown: 1
Must be: 10

`For loop` bounds must be evaluated once at the beginning.

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

Reply via email to