4 ms·
I'm not sure what particular issue your friend ran into, but here's one strange fact about booleans in pre-.net versions of Visual Basic: True is defined as -1
by snprbob86 16y ago
I'm not sure what particular issue your friend ran into, but here's one strange fact about booleans in pre-.net versions of Visual Basic:
True is defined as -1.
This allowed there to be a single, type-agnostic "not" operator. There was no distinction between binary and logical negation.
C, of course, has ~ and ! operators and uses 0 and non-zero for truthiness. When calling into non VB "Classic" modules, the mapping of boolean values can be unnecessarily confusing.