Page 1 of 1

ForEach() begins with index 1, and Index 0 is the last!?

Posted: Sun May 11, 2025 8:41 pm
by bitRocky
This code:

Code: Select all

t = {"Null", "Eins", "Zwei", "Drei", "Vier"}
DebugPrint("ForEach:")
ForEach(t, DebugPrint)

DebugPrint("ForEachI:")
ForEachI(t, DebugPrint)
Gives this output:

Code: Select all

ForEach:
1 Eins
2 Zwei
3 Drei
4 Vier
0 Null
ForEachI:
0 Null
1 Eins
2 Zwei
3 Drei
4 Vier
You see that when using ForEach() the first index (index 0) is display at last.
While ForEachI() does it correct.
Is it normal? Why?

Re: ForEach() begins with index 1, and Index 0 is the last!?

Posted: Sun May 11, 2025 8:48 pm
by jPV