Try BYROW and BYCOL. That's what I use to iterate through an array. Sometimes, I also use MAKEARRAY. It essentially creates a 2d iterator of the size of your choosing. With these, you can almost do everything that a for loop will let you do. I haven't found anything similar to while loops.