OK maybe it’s not kinda, it’s super silly… but it does influence my understanding…a lot
I know that in most case asterisk is used to indicate a pointer
but I also notice it is used like this
- (void) setHoldings:(NSArray *)h
So in the latter case… what does asterisk do? Is it just a part of the name? Does it indicate anything?
ibex10
2
Still indicates a pointer in that context - the variable h is the name of a pointer to an array object.
So why not write it like
- (void) setHoldings:(NSArray)*h
sorry if I miss any important points before…
ibex10
4
[quote]
so why not write it like
- (void) setHoldings:(NSArray)*h
[/quote]
If you wrote it like that, you would commit a syntax error.
Objective-C is a programming language; it has its own grammar (that is, rules for syntax and semantics.)
When writing code, you need to follow the rules of that grammar without making any errors.