Lately, I saw the following line:
[someObject release], someObject = nil;
Why does this work? Why and under which circumstances can there be several calls separated by , in one row? (Not ;)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Objective C is a superset of C, and
,is an operator in C. It evaluates to the last expression in the chain, and creates a sequence point.Semicolon
;cannot be used in an expression because it is not an operator.You may have seen the
,operator at work in a more common situation that involvesforloops: