-(BOOL) and +(BOOL)

May 29, 2015 at 9:20pm
what's the difference between these two?
May 29, 2015 at 10:18pm
Before applying the unary + and - operators the bool value will be promoted to an integer value.

false -> 0
true -> 1

So that means

+false == 0
+true == 1
-false == 0
-true == -1
Last edited on May 29, 2015 at 10:20pm
Topic archived. No new replies allowed.