Thursday, December 26, 2013

Novice ask a grammar question

Definition method:

 - (void) testMathod: (int) p1 andPara2: (int) p2; 



Here andPara2 should be the label of the second argument, the label that first argument is what?
I just started learning, please help explain one of the experts.


Reply:
- (Void) testMathod: andPara2: together, as a function of the label
Reply:
cited a floor ybh37 reply:
- (void) testMathod: andPara2: together, as a function of the label


Thank you.
Parameters Objective-C method with the tag inside says, but why did not the first parameter label it?
Reply:
This is called the sequence notation, you can also add in the first argument in front of a parameter indicates the significance of the name
- (Id) getDateFromYear: (int) y Month: (int) m Day: (int) d {

}
Reply:
Originally called the sequence representation, learning

In fact, you label the function name as the first argument is like, or is the first parameter has no tag
Reply:
reference to the third floor ybh37 reply:
This is called the sequence notation, you can also preceded by a first parameter indicates the significance of the parameters Name
- (Id) getDateFromYear: (int) y Month: (int) m Day: (int) d {

}


Understand, Thank you very much.

No comments:

Post a Comment