For bool
, it can only be used in C++. (For C, there is only _Bool in C99 standard. ) It could be either true
or false
. It’s only true if it’s not 0
.
For BOOL, it’s actually int as typedef int BOOL;
and can be ither TRUE
or FALSE
. It’s only true if it equals 1
.
For BOOLEAN, it’s actually byte as typedef BYTE BOOLEAN
and only 2 bytes long.
For boolean, it’s not a formal type in C/C++.
Usually, bool
is the most common one we use and takes 4 bytes. BOOLEAN
is a better solution with less memory cost. But it’s still recommended to use bool
in that I am already familiar with it.