3 ms·
This can be all sorts of fun in Objective-C, which for historical reasons has a commonly-used BOOL type which is an eight-bit integer. You're supposed to only s
by mikeash 12y ago
This can be all sorts of fun in Objective-C, which for historical reasons has a commonly-used BOOL type which is an eight-bit integer. You're supposed to only store 0 and 1 in it and pretend the other possible values don't exist. Every so often I see some code that uses 2 as well. Once I saw some code, written far too late at night, which used a BOOL as a counter.