STDBOOL(3)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to stdbool(3) β€” the manual page for stdbool, aka standard boolean types. That's the whole name section, but keep scrolling because <stdbool.h> is about to do its little iconic thing. πŸ’…


⭐ SYNOPSIS ⭐

#include <stdbool.h>

πŸ’– DESCRIPTION πŸ’–

The <stdbool.h> header defines four macros, and honestly? It keeps things cute and minimal. Here they are, in all their main-character glory:

  1. bool, which expands to _Bool;
  2. true, which expands to the integer constant 1;
  3. false, which expands to the integer constant 0; and
  4. __bool_true_false_are_defined, which expands to the constant 1.
🚨 heads up, bestie: the ability to undefine and redefine the macros bool, true, and false is an obsolescent feature that may be withdrawn in a future version of a standard. Like, it's giving legacy energy. Do not act surprised if a future standard snatches that ability away. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • stdint(3) β€” go say hi, bestie, it's right there.

🌈 STANDARDS 🌈

The <stdbool.h> header conforms to ISO/IEC 9899:1999 (β€œISO C99”) and IEEE Std 1003.1-2001 (β€œPOSIX.1”). Slay. ✨


πŸ’œ HISTORY πŸ’œ

The <stdbool.h> header was first introduced in NetBSD 1.6. A little origin-story moment for you. 🫢


xoxo, Debian πŸ’– β€” March 21, 2010 β€” STDBOOL(3) over and out, periodt. πŸŽ€

πŸ“¦ where this page comes from