I wasn't hacky. I was frankly rather well balanced.
I merely made two points one of which was not only correct, but also safe:
- 1. You can, contrary to what was written by DeePaak, modify the index counter. That's just informative.
- 2. I provide a macro solution (the one with the modulo, as per my comments) that provides custom steps in a clean and safe way. That was what you asked and certainly not a hacky solution. Unless you disqualify macro's in general.
I also warned against the pitfalls of (1) and even explained why and how I would use (2) as a temp solution.
All in all hardly "hacky". Although Marco's solution,when polished, is a more elegant one.
Ok, I give you one: back in 1997 when I published similar code to (1) in The UNofficial Delphi newsletter (a.k.a. UNDU) it was indeed meant to be hacky
I grew up.