How to keep track of EachIn loop counter?

BlitzMax Forums/BlitzMax Programming/How to keep track of EachIn loop counter?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

When I use EachIn for a loop counter, is there some way to access where in the array/list the loop currently is?

ie

Local myarray:mytype[50]
Local counter:mytype
For counter=EachIn myarray
   Print counter
Next

Should this display indexes in the array (0..49) or should it display pointers to each instance of the type?

If you use EachIn for the looping, how can you know what position you are currently at in the array?