Why do GTK+ and several other frameworks provide TRUE
and FALSE
macros? Is there any advantage to using TRUE
and FALSE
instead of the built-in C values true
and false
? You can see their implementation here: http://www.gtk.org/api/2.6/glib/glib-Standard-Macros.html#TRUE:CAPS
Asked
Active
Viewed 422 times
1

Rose Kunkel
- 3,102
- 2
- 27
- 53
1 Answers
3
C99 has true
and false
, earlier versions do not. That is why you often see TRUE
and FALSE
#define
d. As you can read here, true
and false
are 1
and 0
respectively, same as TRUE
and FALSE
.

Community
- 1
- 1

meaning-matters
- 21,929
- 10
- 82
- 142