Created
March 4, 2015 14:44
-
-
Save dodikk/34fa25af82ca242cc57e to your computer and use it in GitHub Desktop.
Double negation test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-03-04 16:43:36.566 [7773:1208001] Non Zero 1 | |
2015-03-04 16:43:36.567 [7773:1208001] Non Zero 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int value = 0b111100000000; | |
if (!value) { | |
NSLog(@"Equal to zero 1"); | |
} | |
if (value) { | |
NSLog(@"Non Zero 1"); | |
} | |
if (!!value) { | |
NSLog(@"Non Zero 2"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment