Difference between indexing a for loop

link Arrays with periodic boundaries - #4 by stevengj