我想知道這是做什麼或它是什麼速記?在同一行上的賦值和比較運算符
_var1 = _var2 == nil;
我一直在測試這個
_thing1 = 1;
_thing2 = 2;
_thing3 = 3;
NSLog(@"thing1 before %li",(long)_thing1);
NSLog(@"thing2 before %li",(long)_thing2);
NSLog(@"thing2 before %li",(long)_thing3);
_thing1 = _thing1 == _thing3;
NSLog(@"thing1 after %li",(long)_thing1);
NSLog(@"thing2 after %li",(long)_thing2);
NSLog(@"thing3 after %li",(long)_thing3);
我只得到1或0 _thing1。這是否意味着它只是檢查平等?