On Sat, Feb 21, 2009 at 7:11 PM, Kiel Gillard <kiel.gill...@gmail.com> wrote:
> Towards the start of TMPSTLocalStore.m, you're declaring a static pointer
> within the @implementation. I didn't think you could do this, I thought you
> could only declare a static variable outside of the @implementation in the
> .m file.

Sure you can. All @implementation does is allow you to declare ObjC
methods. It has absolutely no effect on anything else, which has the
exact same meaning inside the @implementation block as outside.
Whether you put your global variables, functions, etc. inside or
outside is entirely a matter of taste.

(This is not strictly true. One difference is that functions inside
@implementation are allowed to access the private ivars of an object
of the class whose @implementation it's inside. But this is rarely
useful and in any case doesn't apply here.)

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to