| Start |
|---|
| Using stdbool.h Using the system header file
|
| Using #define C of all versions, will effectively treat any integer value other than Don't introduce this in new code since the definition of these macros might clash with modern uses of |
| Using the Intrinsic (built-in) Type _Bool Added in the C standard version C99,
To use nicer spellings |
| Integers and pointers in Boolean expressions. All integers or pointers can be used in an expression that is interpreted as "truth value". The expression Here the pointer Many people prefer to write something as For this to check, you'd have to scan a complicated code in the expression and be sure about operator preference. is relatively easy to capture: if the pointer is valid we check if the first character is non-zero and then check if it is a letter. |
| Defining a bool type using typedef Considering that most debuggers are not aware of This allows compilers for historic versions of C to function, but remains forward compatible if the code is compiled with a modern C compiler. For more information on RemarksTo use the predefined type To avoid compiler warnings and possibly errors, you should only use the |
Read Article
https://develop.horje.com/learn/1434/reference