What is this objective-c syntax -


this question has answer here:

what caret (^) here , doing ?

- (nsuinteger)hash {   return [self.name hash] ^ [self.birthday hash]; } 

it's bitwise exclusive or. it's not objective-c, it's plain old c. compares bits of both items give , returns value 1s bits 1 in 1 of items not other.

if have 2 numbers:

5  (00000101) 11 (00001011) 

the bitwise exclusive or yield result:

14 (00001110) 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -