I have a question about a part of a book I am learning from.
The line is
I understand that 'h' is the argument of type '(int), then the ':' allows 'Height', the variable, to except that argument. That is the code that I write in my @implementation section. My question is with the words SET and AND, Are they just in the code to make it more readable or are they needed to execute the code correctly. Could it also be written like this?
The line is
Code:
-(void) setWidth: (int) w andHeight: (int) h;
I understand that 'h' is the argument of type '(int), then the ':' allows 'Height', the variable, to except that argument. That is the code that I write in my @implementation section. My question is with the words SET and AND, Are they just in the code to make it more readable or are they needed to execute the code correctly. Could it also be written like this?
Code:
-(void) Width: (int) w Height: (int) h;