Hello Easyrider!
I think for the data size, you're right, although FvM says that some compiler default to 32 bits.
What happens when we typecast the bool variable to char and vice versa char variable to bool??
In general, the cast does nothing except giving a hint to the compiler on how to interpret it.
The data itself does not change. For example, if you read a stream of uint8 from the serial port
and want to print if with printf, it simply does nothing, but will tell the comiler to interpriet the
uint8 * stream as char *, and that's it. Not even 1 bit of the stream will change.
Now that's the same for bools. If they default to uint8, then a cast to bool tells the compiler to
interpret it as a bool.
And if you have a bool returning function like bool IsAscii(char c);, then if you have these statements:
uint8 a;
a = IsAscii('a');
then some compiler will start yelling because you assign a bool to a variable which is uint8, (although
it's the same). And some other compiler will not even issue a warning.
Dora.