#define CLog( s, ... ) NSLog( @"%@", [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#define PO(x) CLog(@#x ": %@", x)
Then I do:
NSString * hello =[NSString stringWithFormat:@"%@, %@",theCatalogData.id,@(theCatalogData.images.count)];
PO(hello);
Works
Of course, a shortened version of this is simply:
PO([NSString stringWithFormat:@"%@, %@",theCatalogData.id,@(theCatalogData.images.count)]);
That doesn't work. I wonder why.
No emergency. No problem. The longer equivalent works anyway. I just want to understand how the compiler parses the macro to see why things don't work.