Opened 18 years ago
Last modified 14 years ago
#102 closed defect (invalid)
Boolean b = noEvent(x > 0) should generate an error.
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Instantiation | Version: | 1.4.5 |
Keywords: | Cc: | Adrian Pop, haklu |
Description
See comments.
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 14 years ago
I'm closing this as it is wrong.
noEvent() can return any type. What it does is make sure that any real relations inside this arbitrary expression does not generate events/zero-crossings.
Note:
See TracTickets
for help on using tickets.
assigning noEvent to discrete Boolean variables should generate an error.
--- ShouldFail.mo ---
model ShouldFail
equation
end ShouldFail;
--- script ---
loadFile("ShouldFail.mo");
simulate(ShouldFail, stopTime = 20);
plot({x, b});
The ShouldFail model, should fail because noEvent has the return type
of Real and is assigned to Boolean.
Regards,
Adrian Pop/