[Ilugc] [Technical] Does 'C' language specification has 'boolean' datatype ?

  • From: prasannatsmkumar@xxxxxxxxx (prasannatsmkumar)
  • Date: Sat, 17 Dec 2011 12:27:53 +0530

On Sat, Dec 17, 2011 at 11:46 AM, Akilan R <akilan27 at gmail.com> wrote:

On Sat, Dec 17, 2011 at 11:10 AM, Selvakumar Rajeswaran <
selva_rsr at yahoo.com
wrote:

Does 'C' language specification has 'boolean' datatype ?


Unless you are dealing with an ancient compiler, answer is yes. <stdbool.h>
defines standard macros that takes care of compatibility issues too in case
you are using old code that defines 'bool' differently.

This explains its usage and advantages:
http://www.jacquesf.com/2011/04/in-defense-of-the-c99-boolean-type/

--
?????? (Akilan R)
[ blog.akilan.in ]
*I should have no use for a paradise in which I should be deprived of the
right to prefer hell.*
 --Jean Rostand
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


C99 has bool datatype. Older compilers don't have that. You can use Bool in
case of gcc (when using C89 standard). It is better to go with bool (and
C99) if you are not going to use multiple (or older) compilers.

Other related posts: