Why-1 and 0? Let's see:
True =-1( 10 radix) =&; HFFFF( 16 radix) =11111(binary).
False = 0( 10 radix) =&; H0000( 16) = 0000000 (binary)
As you can see,-1 is an 8-bit integer of 1, and 0 is an 8-bit integer of 0, which explains why you can get False without operation on True, and you can get True without operation on False, because these two numbers are completely opposite!
So the actual value of True is-1. You can verify it yourself in the instant window of VB:
false+ 1
false * 100
- 100
true/ 10
-0. 1
Do you see it? Really can directly participate in numerical operation! Because it is actually-1!
To add: If you want to convert an ordinary numerical value into a Boolean value, the rule of VB (similar to other languages) is that any non-zero value is true and 0 is false. For example, judging whether a number is not equal to 0 is generally done like this;
If x<& gt is 0.
But it can actually be reduced to
If x, then
Thanks