Poll: What value is typically used to represent the concept of "true" (Boolean) in most programming languages?
0
16.6%
>0 or <0
67.5%
WTF is this?
15.9%
Poll ended at .
@nixCraft i thought it was "false = 0" and "true = 1". maybe its a C thing.
@DominicDeligann @nixCraft it's more false = 0 and true !0, then again C has no booleans
@joaquimCarneiro @DominicDeligann @nixCraft it does actually. They're even keywords in C23. Conditionals still accept ints, though.
@mrcarrot @DominicDeligann @nixCraft without including stdbool?
@joaquimCarneiro @DominicDeligann @nixCraft Yep. And even in C17, you can get them with the keywords _Bool, _False, and _True without including the header.
@mrcarrot @DominicDeligann @nixCraft i have seen _False and _True but never had the need to use it
@joaquimCarneiro @DominicDeligann @nixCraft Technically, you're using them when you include stdbool, since that just defines some slightly nicer names for them.