[Previous] [Contents] [Next]

<stdbool.h>

[Added with C99]


Include the standard header <stdbool.h> to define a type and several macros suitable for writing Boolean tests. The standard header <stdbool.h> is available even in a freestanding implementation.

    /* MACROS */
#define bool _Bool [keyword in C++]
#define false 0 [keyword in C++]
#define true 1 [keyword in C++]
#define __bool_true_false_are_defined 1

    /* TYPES */
typedef i-type bool; [keyword in C++]

__bool_true_false_are_defined

#define __bool_true_false_are_defined 1

The macro yields the decimal constant 1.

bool

#define bool _Bool [keyword in C++]

The macro yields the type _Bool.

false

#define false 0 [keyword in C++]

The macro yields the decimal constant 0.

true

#define true 1 [keyword in C++]

The macro yields the decimal constant 1.


See also the Table of Contents and the Index.

Copyright © 2000-2002 by P.J. Plauger. All rights reserved.

[Previous] [Contents] [Next]