This is more like general question: Is there a way to assign a value like an if statement? I have a dictionary and I want to check if key exists and then assign. For example:
if((_attr.val = [self.dic objectForKey:@"name"]))
And i know that if key exist in _attr.val i will get object, if not i will get null. Great, but if statemant requires to_do_something after it, but in my case this is it - all what i want to do.
This is probably a silly question, but i'm having trouble with finding a solution.
I want to find something like ASSERT() known from c++.