How to keep track of EachIn loop counter?

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

Why not just use a var?
Local myarray:mytype[50]
Local counter:mytype
Local index:Int=0

For counter=EachIn myarray
  index:+1
  Print index+": whatever"
Next


Neville:
For counter = 0 Until myarray.length
Should be:
For counter = 0 Until myarray.length-1

Arrays are 0 based remember :)


Tom