<<< Boolean Type | Index | Character Data Type >>> |
Boolean types can be converted to plain integer numbers and back:
void main() { int i = -1; bool b = i; // b will be true int x = b; // x will be set to 1 x = 0; b = x; // b will be set to false }
Note: no assumptions should be made regarding the size of bool type. On many systems it takes 8 bits to store a boolean variable.
<<< Boolean Type | Index | Character Data Type >>> |