3 ms·
This is how Visual Basic 6 and below worked; True was -1 and False was 0, so that bitwise and logical operators could be unified.
by pcwalton 14y ago
This is how Visual Basic 6 and below worked; True was -1 and False was 0, so that bitwise and logical operators could be unified.
- astrodust 14y agoPresumably this is because -1 is all bits on in two's complement (http://en.wikipedia.org/wiki/Twos_complement http://en.wikipedia.org/wiki/Twos_complement).