Current location - Training Enrollment Network - Mathematics courses - Can a function with a return value have multiple return values?
Can a function with a return value have multiple return values?
There can only be one return value, but you can return a structure or array containing multiple data, or you can return it through a reference, pointer parameter or global variable.

Function, the name comes from the mathematician Li's book Algebra. He translated this way because "whoever believes in this variable is the function of that variable", that is, the function means that one quantity changes with another quantity, or that one quantity contains another quantity.

The definition of function is usually divided into traditional definition and modern definition. The essence of these two functional definitions is the same, but the starting point of narrative concept is different. The traditional definition is from the perspective of movement change, and the modern definition is from the perspective of set and mapping.