Opened 10 years ago

Closed 10 years ago

#3065 closed defect (fixed)

Variable outside interval wrongly reported for integer variables

Reported by: Adrian Pop Owned by: Martin Sjölund
Priority: high Milestone: 1.9.2
Component: Backend Version: trunk
Keywords: Cc:

Description

See for example the test in r23970.
We get a message:

messages = "Warning: Variable state.phase out of [min, max] interval: state.phase >= 0 and state.phase <= 2 has value: 1"

which is clearly wrong.

Change History (4)

comment:1 by Martin Sjölund, 10 years ago

The error is the modelica_integer_to_modelica_string_format function, which uses %d instead of %ld as the format string.

comment:2 by Adrian Pop, 10 years ago

That might be the case as on 32 bit Windows this message does not show.

comment:3 by Martin Sjölund, 10 years ago

Owner: changed from somebody to Martin Sjölund
Status: newaccepted

I will change the String conversion functions to parse the format string correctly

comment:4 by Martin Sjölund, 10 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.