These are great little snippets of code in RPG. I’ll post more as I find them.
No more hard-coded maximum for looping through an array. If the array size is changed in the future, you don’t have to worry about it.
for i = 1 to %elem(array);