I think there are two boolean type we can use bool and BOOL. What's the difference between those two?
bool contains true and false; BOOL contains TRUE and FALSE, can they be interchangeable?
I think there are two boolean type we can use bool and BOOL. What's the difference between those two?
bool contains true and false; BOOL contains TRUE and FALSE, can they be interchangeable?
Mattt has written a blog post about this:
Objective-C defines BOOL to encode truth value. It is a typedef of a signed char, with the macros YES and NO to represent true and false, respectively.
bool
is the datatype defined in C99.
BOOL
is defined in Objective-C as typedef signed char BOOL.
Check out this Thread