Time:11-26
CodePudding user response:
have an existing function, has been used in some places, I want to add a parameter in the funtion, do not know will not affect already in place?
Quote: refer to the original poster singing sound Amadues response: have an existing function, has been used in some places, I'd like to add a parameter in the funtion, do not know will not affect already in place? If you add in the end, the most the most simple you just need to do processing of the parameter for into good, of course, if the parameter is optional parameters in front of you, just the judgment more
have an existing function, has been used in some places, I'd like to add a parameter in the funtion, do not know will not affect already in place?
Quote: refer to the second floor bubble fish _ response: Quote: refer to the original poster singing sound Amadues response: have an existing function, has been used in some places, I'd like to add a parameter in the funtion, do not know will not affect already in place? If you add in the end, the most the most simple you just need to do processing of the parameter for into good, of course, if the parameter is optional parameters in front of you, just the judgment more Only need to add at the end of the parameters for processing, behind only refer to the function of the place will use this parameter, the used no matter before, My question is if you added a parameter function here into the function (a, b), call the place is still a function (a), will have a problem,
no problem, before the call just reads the parameter a, add parameters used after ok, as long as he doesn't pass b alone actually use {} is more convenient to expand function parameters, to do is add fields on the attribute to add
Page link:https//www.codepudding.com/frontend/88135.html