Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What are the values of Boolean expressions true and false in vb?
What are the values of Boolean expressions true and false in vb?
The Boolean expression of VB is very strange. If converting from Boolean to integer, the value of TRUE is-1, and the value of false is 0.

If you use CBool to convert an integer to a Boolean value, any non-zero value is true and 0 is false.

In addition, I don't know if you know that for text types, the strings "TRUE" and "FALSE" can also be converted into Boolean types through CBool, but other strings can't, and there will be a type mismatch error, which I just discovered recently.