Re: Core Data property declaration
Re: Core Data property declaration
- Subject: Re: Core Data property declaration
- From: Scott F Bayes <email@hidden>
- Date: Fri, 2 Nov 2007 11:41:10 +0900
On Nov 2, 2007, at 10:32 , Erik Buck wrote:
[deleted]
Note the "*lastName". The extra asterisk makes ALL
the difference in C, and the asterisk is NOT
associated with the type name, it is associated with
the variable and should/must be grouped with the
variable.
The * makes ALL the difference as you say, but it needn't be "grouped"
in terms of textual format, just properly associated with the variable
name. Assuming @property follows C syntactic rules. either of the
following should be fine:
@property(retain) NSString *firstName, *lastName;
@property(retain) NSString* firstName, * lastName;
Though I like the first syntax better for aesthetic reasons (that
second variable looks odd in the second line, with the * in empty
space).
The mental trick I use to keep track of what associates with what in
"typename *varname;" is: "*varname is an instance of typename, so
varname is a reference to typename".
ScottB
Is the document correct or am I. I am away from any
Leopard machine, so I can't just test it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden