Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

#include <stdbool.h>

Name: Anonymous 2011-10-14 14:26

The header stdbool.h in the C Standard Library for the C
programming language contains four macros for a Boolean data
type. This header was introduced in C99, which was adopted as
an ANSI standard in May 2000. 11 years ago.


#ifndef _STDBOOL_H
#define _STDBOOL_H

#define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined 1

#endif


Spread the word!

Name: Anonymous 2011-10-15 5:08

>>8
1 = true
0 = false
>>7
I do.

Coming from an asm background, I don't see much need for bool as I'd extend my functions to return more than true/false (e.g. instead of returning true/1 for error, return a non-zero error reason.)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List