R
Ramprasad A Padmanabhan
Hello all,
On my linux box ( redhat 7.2 ), I have been using char as a boolean data
type. In order to save on the number of bytes as compared to using int
or short int.
typedef char boolean;
boolean x;
x=1;
.....
if(x){
/* x is true */
} else {
/* x is false */
}
}
Is this usage of valid on all platforms. I will be happy If this will work
on all linux distributions at least.
Thanks
Ram
On my linux box ( redhat 7.2 ), I have been using char as a boolean data
type. In order to save on the number of bytes as compared to using int
or short int.
typedef char boolean;
boolean x;
x=1;
.....
if(x){
/* x is true */
} else {
/* x is false */
}
}
Is this usage of valid on all platforms. I will be happy If this will work
on all linux distributions at least.
Thanks
Ram