Apparently you're trying to work with one based numbers and arrays: zero base is much more convenient in these cases. Internally you probably want to keep everything in zero base.
Mod and \ with one based array, returning one based row and column:
As you can see, it eventually goes back to zero base, then jumps back to one base.Code:Const Index = 12 Const Cols = 10 X = ((Index - 1) Mod Cols) + 1 Y = ((Index - 1) \ Cols) + 1




Reply With Quote