The For Each loop over an array of strings appears to be stopping one short (plus corruption of strings)
The routine they call
The logs show
Note: dont try (unless you like stack dumps and eternal reboot loops) in the Sub returnStrings.
B4X:
Log("*** for each ***")
For Each ss As String In returnStrings
Log(ss)
Next
Log("*** for loop ***")
For tmp = 0 To returnStrings.Length - 1
Log(returnStrings(tmp))
Next
Log("---Done---")
The routine they call
B4X:
Sub returnStrings() As String()
Dim arrString(4) As String
arrString(0) = "first"
arrString(1) = "second"
arrString(2) = "penultimate"
arrString(3) = "lastOne"
Return arrString
End Sub
The logs show
Note: dont try (unless you like stack dumps and eternal reboot loops) in the Sub returnStrings.
B4X:
Dim arrString(4) As String = Array As String("first","second","penultimate","lastOne")
Last edited: