I have an iOS app that uses CoreData; the xcdatamodel has several boolean attributes. My question is: in my objective-c code, are BOOL and bool interchangeable within those attributes? The way I've written my code, the logic depends on true or false (1,0) and yes, I know the difference between BOOL and bool.
Asked
Active
Viewed 70 times
0
-
1Is there a reason you wouldn't use `BOOL`, or are you asking this in an academic way? What do you mean by "interchangeable within those attributes", too? Are you asking about assigning a `BOOL` to a `bool` and vice versa, or about declaring your properties as `bool` instead of `BOOL`? – Itai Ferber Dec 18 '16 at 20:24
-
I just did a search, and I have many, many more instances of BOOL in my code rather than bool... – SpokaneDude Dec 18 '16 at 21:01
-
1so the question has answered itself... sort of... thank you for your time, I appreciate it. – SpokaneDude Dec 18 '16 at 21:09
-
No problem. I recommend you post an answer to your own question with what you discovered; this way you can mark it as the correct answer, and others will benefit from what you've found. – Itai Ferber Dec 18 '16 at 21:35