First page Back Continue Last page Graphics
Boolean type
'C' language has boolean type which can take values true and false.
Objective C has similar type BOOL, which can hold values YES and NO.
BOOL in Objective C is only typedef for signed char.
Compiler considers BOOL to be 8 bit number.
Internally manages NO with 0 value and YES with value 1.
Since this can hold any number. If more than 1 byte long value assigned, such as short and int is assigned, only the lowest byte value is used for BOOL.
BOOL is not like 'C' where non zero value is considered true.