For example, i can assign the result of function call to a variable.
Or i can pass a variable for a routine to use it to save its result to it.
So, What is the benefit of output parameters?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Suppose the routine has more than one result? You could have several output parameters.
In languages where you return complex objects we will tend to make, say, a CartesianCoordinate result object, but otherwise it can be useful to have an outX and an outY parameter.