Opened 13 years ago
Closed 13 years ago
#1969 closed defect (fixed)
function with multiple return value used only first one does not work
| Reported by: | Jens Frenkel | Owned by: | Adrian Pop |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.9.0 |
| Component: | Frontend | Version: | trunk |
| Keywords: | MultiFunctionReturnValueUseOnlyFirst | Cc: |
Description
According to the msl example
// Real x[:], y[:], xi, yi;
// Integer iLast, iNew;
yi = Vectors.interpolate(x,y,xi);
(yi, iNew) = Vectors.interpolate(x,y,xi,iLast=1);
the following model does not work because the FrontEnd does not generate an TSUB Expression around the function call. As a consequence compilation fails.
model MultiFunctionReturnValueUseOnlyFirst
equation
assert(abs(Modelica.Math.Vectors.interpolate({ 0, 2, 4, 6, 8, 10},{10, 20, 30, 40, 50, 60},5)) < 0.1,"Only a Test");
end MultiFunctionReturnValueUseOnlyFirst;
Attachments (2)
Change History (5)
by , 13 years ago
| Attachment: | MultiFunctionReturnValueUseOnlyFirst.mo added |
|---|
by , 13 years ago
| Attachment: | MultiFunctionReturnValueUseOnlyFirst.mos added |
|---|
comment:1 by , 13 years ago
| Status: | new → assigned |
|---|
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

This is a duplicate of #1946. It seems my fix of it was a bit wrong.
I'll see if I can wrap the fcall expression inside DAE.TSUB.
Cheers,
Adrian Pop/