Functions with Multiple Results


There is a special form of assignment statement that is only used when the right-hand side contains a call to a function with multiple results. The left-hand side contains a parenthesized, comma-separated list of variables receiving the results from the function call. A function with n results needs n receiving variables on the left-hand side.




1 Calling the function f

We can call f with some input values and see what outputs it returns.





2 Simulation of the fCall model

We simulate fCall in the interval from 0 to 1, then we can look at the values of the variables.