02-14-2024, 09:29 AM
eoredson,
Change 64 in line one to 16. I got 'FFFF' instead of 'FFFFFFFFFFFFFFFF'. Then I changed the 16 to 32 when the limit is reached. When 32 is reached I went to 64. To keep the 16 bit 'F' in line as I go up. With 64 you was having 16 'F' instead of 4 'F'. This is not the easiest thing to grasp. With the changes I made the count goes smoothly up like it should. -GareBear.
Change 64 in line one to 16. I got 'FFFF' instead of 'FFFFFFFFFFFFFFFF'. Then I changed the 16 to 32 when the limit is reached. When 32 is reached I went to 64. To keep the 16 bit 'F' in line as I go up. With 64 you was having 16 'F' instead of 4 'F'. This is not the easiest thing to grasp. With the changes I made the count goes smoothly up like it should. -GareBear.
Code: (Select All)
Dim b As _Unsigned _Bit * 16 ' This gives one more 'F'instead of twelve more in line 9.
b = &B1111
Print Hex$(b)
b = &B11111111
Print Hex$(b)
b = &B111111111111
Print Hex$(b)
b = &B1111111111111111
Print Hex$(b) ' Prints FFFF.
Dim c As _Unsigned _Bit * 32 ' I used a new variable c instead of b. for a new dimension. 32 is 32bits.
c = &B11111111111111111111
Print Hex$(c)
c = &B111111111111111111111111
Print Hex$(c)
c = &B1111111111111111111111111111
Print Hex$(c)
c = &B11111111111111111111111111111111
Print Hex$(c)
Dim d As _Unsigned _Bit * 64 ' The same as line 10. I upped it up to 64 bits
d = &B111111111111111111111111111111111111
Print Hex$(d)
d = &B1111111111111111111111111111111111111111
Print Hex$(d)
d = &B11111111111111111111111111111111111111111111
Print Hex$(d)
d = &B111111111111111111111111111111111111111111111111
Print Hex$(d)