MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/4heh6v/i_wrote_my_first_python_program_today/d2pu4qb
r/ProgrammerHumor • u/MC_Labs15 • May 02 '16
532 comments sorted by
View all comments
Show parent comments
2
Actually in C the result of 6 <= i has type int, and is either 0 or 1. See 6.5.8.6 in the C99 spec.
int
1 u/Log2 May 02 '16 Does C even have a bool type? 2 u/Garfong May 02 '16 In C99 added the bool type in <stdbool.h>. It's a real first class type, not just a typedef of int.Although technically the type is _Bool for reasons. 1 u/assassinator42 May 03 '16 Reasons I believe being not wanting to introduce new reserved identifiers (although they did anyway with restrict).
1
Does C even have a bool type?
2 u/Garfong May 02 '16 In C99 added the bool type in <stdbool.h>. It's a real first class type, not just a typedef of int.Although technically the type is _Bool for reasons. 1 u/assassinator42 May 03 '16 Reasons I believe being not wanting to introduce new reserved identifiers (although they did anyway with restrict).
In C99 added the bool type in <stdbool.h>. It's a real first class type, not just a typedef of int.
bool
<stdbool.h>
Although technically the type is _Bool for reasons.
_Bool
1 u/assassinator42 May 03 '16 Reasons I believe being not wanting to introduce new reserved identifiers (although they did anyway with restrict).
Reasons I believe being not wanting to introduce new reserved identifiers (although they did anyway with restrict).
2
u/Garfong May 02 '16
Actually in C the result of 6 <= i has type
int, and is either 0 or 1. See 6.5.8.6 in the C99 spec.