I've just seen this in another question and thought the comma must be a typo
[controller release], controller = nil;
I'm using ARC so didn't use release
, but I tested this myself the following code and found that it compiled and ran fine.
NSObject *a = [NSObject new];
[a copy], a=nil;
I was under the impression that the comma was only used for separating lists and multiple assignments of the same type:
NSArray *a = @[@"1", @"two", /*etc*/];
int a, b, c, d;
Actual Question:
Is it as simple as: The comma can be used to separate commands? Are there any other rules?