[Ilugc] [Technical] Does 'C' language specification has 'boolean' datatype ?
- From: rajasuperman@xxxxxxxxx (Raja Subramanian)
- Date: Sat, 17 Dec 2011 13:12:10 +0530
On Dec 17, 2011 11:20 AM, "0" <0 at 0throot.com> wrote:
Nope, just define one using typedef such as,
#define true 1
Since C defines any non-zero value as true, rather than defining true as 1
you better define true as !0. Ie, true is the opposite of false.
This is the only way to ensure that a test against 2 true values will work
in all cases.
- Raja
Other related posts: