Opened 16 years ago
Last modified 16 years ago
#1032 closed defect (fixed)
Compilation fails when using min, max
Reported by: | Jens Frenkel | Owned by: | Jens Frenkel |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Frenkel TUD, |
Description
Hello,
I found a new problem introduced with the new OpenModelica 1.4.5. If there is 'min' or 'max' in the equations the compilation fails.
The log file says: "Test.cpp:351: error: no matching function for call to `max(double&, int)'"
The following model produces this error:
model Test
Real x(start = -1);
Real a;
equation
der(x) = 1;
a = max(x,0);
end Test;
Replacing the line 'a = max(x,0)' by 'a = max(x,0.0)' fixes the problem. However, I am sure that this was not necessary in the 1.4.4 version.
Kind regards,
Jens Frenkel
Note:
See TracTickets
for help on using tickets.
fixed in revision 3822