Closed BlockHeader closed 5 years ago
Hi
I'm not sure this is correct, we want to print groups of 8 bits, not 7...
Yes. Sure you want to print groups of 8 bits. However, the origin logic tries to print groups of 9 bits. 0, 1, 2, 3, 4, 5, 6, 7, 8 (%8 == 0) 0, 1, 2, 3, 4, 5, 6, 7, 8 (%8 == 0) So I think 8 should be changed to 7. Of course, I found the minor issue when the interface is used.
Ah
$ python3 -mptpython
>>> for i in range(50):
... if i > 0 and i % 8 == 0:
... print('')
... print(i)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
vs
>>> for i in range(50):
... print(i)
... if i > 0 and i % 8 == 0:
... print('')
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
The 2nd group is 7 bits rather than 8...
>>> for i in range(50):
... print(i)
... if i > 0 and i % 7 == 0:
... print('')
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Signed-off-by: root star@trapdoortech.com