Program is:

Code: Select all

```
lov={1,2,3,4,5}
For Local i=0 To ListItems(lov)-1
DebugPrint("lov[" .. i .. "]=" .. lov[i])
Next
DebugPrint("-------------")
ForEachI(lov,Function(p_index,p_value) DebugPrint("lov[" .. p_index .. "]=" .. p_value) EndFunction)
DebugPrint("-------------")
ForEach(lov,Function(p_index,p_value) DebugPrint("lov[" .. p_index .. "]=" .. p_value) EndFunction)
```

Code: Select all

```
lov[0]=1
lov[1]=2
lov[2]=3
lov[3]=4
lov[4]=5
-------------
lov[0]=1
lov[1]=2
lov[2]=3
lov[3]=4
lov[4]=5
-------------
lov[1]=2
lov[2]=3
lov[3]=4
lov[4]=5
lov[0]=1
```

Thus one cannot use ForEach if the order of execution is important !