开发者

Objective-C modifiers question

开发者 https://www.devze.com 2023-03-16 12:45 出处:网络
In objective C, in my header files, I often do this: @private NSString *h1; @private NSString *str; But would that be the same as simply doing:

In objective C, in my header files, I often do this:

@private
NSString *h1;

@private
NSString *str;

But would that be the same as simply doing:

@private
NSString *h1;
开发者_开发百科NSString *str;


Yes they are functionally equivalent. The first example is just a waste of space.


Yes, they are the same. Per the documentation: The Objective-C Programming Language

0

精彩评论

暂无评论...
验证码 换一张
取 消