Not sure if this is a bug or not.
Last col. rotated by 2 each time.
2nd last col. rotated by 2 every 4th count.
3rd last col rotated by 2 every 16th count.
4th last col. rotated by 2 every 64th count.
Numbers are not to use the very first line of numbers in the debug screen.
at line 257. 3rd number is using the very first number in the debug screen .
only once then continues where it should.
A bug or just bad code?
Code: Select all
Dim b.l(6)
b(1) = 3 : b(2) = 4 : b(3) = 1 :b(4) = 6 : b(5) = 7 : b(6) = 2
Debug "Line :- "+Str(b(1))+" "+Str(b(2))+" "+Str(b(3))+" "+Str(b(4))+" "+Str(b(5))+" "+Str(b(6))
Debug "-----------------"
b(1)+2:b(2)+2:b(3)+2:b(4)+2:b(5)+2:b(6)+2
For i.l = 1 To 260
;
Debug Str(i)+" :- "+Str(b(1))+" "+Str(b(2))+" "+Str(b(3)) +" "+Str(b(4))+" "+Str(b(5))+" "+Str(b(6))
;-----Chamber 6 rotate 2 OK------
If b(6) = 0 : b(6)+ 2: EndIf
b(6) = (b(6)+ 2) % 10
;--------------------------------
;-----Chamber 5 rotate 4 OK------
If i %4 =0 : b(5) + 2 %10 :EndIf
If b(5) = 7 : b(5) + 2 % 10:EndIf
b(5) = b(5) % 10
;--------------------------------
;-----Chamber 4 Rotate 16 OK-----
If i %16 =0 : b(4) + 2 %10 :EndIf
If b(4) = 6 : b(4) + 2 % 10:EndIf
b(4) = b(4) % 10
;--------------------------------
;-----Chamber 3 Rotate 64 ** ROTATION NOT WORKING
If i %64 =0 : b(3) + 2 %10 :EndIf
If b(3) = 1 : b(3) + 2 % 10 :EndIf
b(3) = b(3) % 10
;------------------------
Next i