NSComparisonResult question

Nibbie
Posts: 3
Joined: 2009.05
Post: #1
Hello everyone,

I'm a newbie Objective-C developer, been studying it for about 3 weeks now, and I've got a question.

When declaring an object such as NSComparisonResult you don't do so using the * sign, yet you do use the * sign when declaring things such as NSString.

Is that simply because NSComparisonResult returns a constant, whereas NSString is a class? So anytime you declare a "class" variable you have to use the indirection operator?

Thanks very much for your assistance.

Smile

BangTickBoom
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #2
NSComparisonResult is just an integer, not an object, hence there's no need to declare it as a pointer.

"When you dream, there are no rules..."
Quote this message in a reply
Nibbie
Posts: 3
Joined: 2009.05
Post: #3
I actually found the answer in the book I'm studying shortly after putting the post up. Thanks!

Bangtickboom
Quote this message in a reply
Post Reply