11-28-2022, 09:54 PM
As I posted for Pete -- getting the pattern one wants is completely trivial. Why is this such an issue for folks??
^That's it. That's all one has to do to get the results they want. If you have some God-fearing aversion for Functions, then just use ((num1 Mod num2) + num2) Mod num2 directly. It's not rocket science -- it's just remainders after division!
Code: (Select All)
For i = 10 To -10 Step -1
Print i Mod 5, ModX(i, 5)
Next
Function ModX (num1, num2)
ModX = ((num1 Mod num2) + num2) Mod num2
End Function
^That's it. That's all one has to do to get the results they want. If you have some God-fearing aversion for Functions, then just use ((num1 Mod num2) + num2) Mod num2 directly. It's not rocket science -- it's just remainders after division!