Functions with Multiple Results

A function that has more than one output parameter has multiple results.

Call it directly:

1 Simulation of Call to MultipleResultsFunction

2 PointOnCircle

Another example of a multiple results function is the function pointOnCircle, which computes the cartesian coordinates of a point located at a certain angle on a circle with a certain radius. The cartesian coordinates are returned via the two result variables x and y.

Call it:

load Modelica library

3 Function Call on Equation Form

When calling a multiple results functions there are two possibilities, equation form or statement form.

4 Simulation of EquationCall

5 Function Call on Statement Form

6 Simulation of StatementCall