Cualquier compilador de C con menos de 10-15 años debería castear un int a un bool sin problemas ( y darte un performance warning por el camino). Ej.
void myfunc( bool v ){}
myfunc(27) se debería compilar como
myfunc( 27 != 0)
C99 [wikipedia.org] Incluye el tipo bool como un tipo básico de datos.
"... several new data types, including long long int, optional extended integer types, an explicit boolean data type, and a complex type to represent complex numbers"
Por otra parte escribir a un puerto un bool es una idea "no buena" como poco.
Si aún vives en el mundo del pasado, no hay tanto de qué quejarse, Java todavía está muy verde y C# no existe.
--
# Software development isn't just a process of creating software; it's also a process of learning how to create it
Bienvenido al mundo del futuro.
(Puntos:1)( http://barrapunto.com/ )
void myfunc( bool v ){}
myfunc(27) se debería compilar como
myfunc( 27 != 0)
C99 [wikipedia.org] Incluye el tipo bool como un tipo básico de datos.
"... several new data types, including long long int, optional extended integer types, an explicit boolean data type, and a complex type to represent complex numbers"
Por otra parte escribir a un puerto un bool es una idea "no buena" como poco.
Si aún vives en el mundo del pasado, no hay tanto de qué quejarse, Java todavía está muy verde y C# no existe.
# Software development isn't just a process of creating software; it's also a process of learning how to create it