Here are two bits of code for you.PeterGams wrote:The second row runs into 2 digits. And won't rotate back to start.
Any ideas ?
Code: Select all
num5 = 5 : num6 = 8 ; or whatever initialNum6 = num6 initialNum5 = num5 Repeat Debug Str(num6) + " - " + Str(num5); + Str(initialNum) ; Or whatever is being done with it num6 + 2 : num5 + 2 If num6 > 9 : num6 - 10 If num5 > 9 : num5 - 10 EndIf EndIf Until num6 = initialNum6 : Or num5 = initialnum5
Code: Select all
a.l = 5
For i.l = 1 To 5
a = (a + 2) % 10
Debug a
Next i
Code: Select all
Dim b.l(2)
b(0) = 3
b(1) = 4
b(2) = 1
For i.l = 1 To 5
;
b(0) = (b(0) + 2) % 10
b(1) = (b(1) + 2) % 10
b(2) = (b(2) + 2) % 10
;
Debug Str(b(0))+" "+Str(b(1))+" "+Str(b(2))
;
Next i