https://bugs.documentfoundation.org/show_bug.cgi?id=128655
Bug ID: 128655
Summary: Basic For statement supports "For Each item In array"
second syntax that's not documented
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: trivial
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
For Each item In array
[ statements ]
[ Exit For ]
[ statements ]
Next [ item ]
Steps to Reproduce:
cf. infra for new code snippet
Actual Results:
n/a
Expected Results:
n/a
Reproducible: Always
User Profile Reset: No
Additional Info:
Sub For_Each
vector = Array(1,"deux",3.08, &hFFFFFFFF)
For Each item In vector
MsgBox item
Next item
End Sub
Sub ExampleSort
Dim sEntry(9) As String
Dim iCount As Integer
Dim iCount2 As Integer
Dim sTemp As String
sEntry = Array("Jerry", "Patty", "Kurt", "Thomas", "Michael", _
"David", "Cathy", "Susie", "Edward", "Christine")
For iCount = 0 To 9
For iCount2 = iCount + 1 To 9
If sEntry(iCount) > sEntry(iCount2) Then
sTemp = sEntry(iCount)
sEntry(iCount) = sEntry(iCount2)
sEntry(iCount2) = sTemp
End If
Next iCount2
Next iCount
For iCount = 0 To 9 Step 1
Print sEntry(iCount)
Next iCount
End Sub
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs