Returns

May 3, 2014 at 5:09am
Assume you have a function that needs to return 3 data items. What would be the best approach to use? Pick the one best answer.
A. Use a return statement to return all three items
B. Use three value parameters to return the three data items
C. Use three reference parameters to return the three data items
D. Use two reference parameters and a return statement to return the three values.
May 3, 2014 at 7:51am
Last edited on May 3, 2014 at 7:52am
May 3, 2014 at 9:32am
There are situations where D would be a valid choice. For example, a function that returns two things and a status code.
Topic archived. No new replies allowed.