fxm wrote: ↑Feb 23, 2022 6:41
The definition under the hood of a Boolean is an 1-bit integer.
So a conversion overflow warning is applied as for any other numeric datatype (Byte, Short, ...) only at compile time (only for a literal value).
fxm wrote: ↑Feb 23, 2022 6:55
So a conversion overflow warning is applied as for any other numeric datatype (Byte, Short, ...) only at compile time (only for a literal value).
So why does dim a as byte = 10: print cbool(a) not give a conversion warning? It would seem more appropriate here with an explicit data type than with a numerical constant (intentionally) without explicit datatype. The warning is hard to understand, especially for beginners and doesn't really serve a practical purpose IMO.