Opened 10 years ago
Last modified 8 years ago
#3097 closed defect
Relational operators give inconsistent results — at Initial Version
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | *unknown* | Version: | trunk |
Keywords: | Cc: |
Description
In the following model, relational operators give inconsistent results when the compared variable is set using an "if-expression":
model Test
Real y;
Boolean b1 = y < 100.0;
Boolean b2 = y <= 100.0;
Boolean b3 = y == 100.0;
Boolean b4 = y >= 100.0;
Boolean b5 = y > 100.0;
equation
y = if time > 2 then 100 else 0;
end Test;
The results show that b1 b2 and b3 are all true at the same time, which is illogical.
Note:
See TracTickets
for help on using tickets.