Opened 18 years ago

Last modified 14 years ago

#110 closed defect (fixed)

Linefeeds in Modelica comment strings causes simulation failure

Reported by: petfr Owned by: petfr
Priority: critical Milestone:
Component: Version:
Keywords: Cc: petfr, adrpo

Description

See comments.

Change History (2)

comment:1 Changed 18 years ago by petfr

Linefeeds in Modelica comment strings causes simulation failure
since they are transmitted to the C code.

Not acceptable from the usability point of view.

Example: linefeed in comment string for Real s:

partial model Rigid "Rigid connection of two translational 1D flanges"

Real s "Absolute position s of center of component

(s = flange_a.s + L/2 = flange_b.s - L/2)";

parameter Real L = 0 "Length L of component from left to right flange"+

"(L = flange_b.s - flange_a.s)";

Modelica.Mechanics.Translational.Interfaces.Flange_a flange_a;
Modelica.Mechanics.Translational.Interfaces.Flange_b flange_b;

equation

flange_a.s = s - L/2;
flange_b.s = s + L/2;

end Rigid; From Modelica.Mechanics.Translational.Interfaces

Could be changed manually to:

partial model Rigid "Rigid connection of two translational 1D flanges"

Real s "Absolute position s of center of component"+

"(s = flange_a.s + L/2 = flange_b.s - L/2)";

parameter Real L = 0 "Length L of component from left to right flange"+

"(L = flange_b.s - flange_a.s)";

Modelica.Mechanics.Translational.Interfaces.Flange_a flange_a;
Modelica.Mechanics.Translational.Interfaces.Flange_b flange_b;

equation

flange_a.s = s - L/2;
flange_b.s = s + L/2;

end Rigid; From Modelica.Mechanics.Translational.Interfaces

comment:2 Changed 14 years ago by sjoelund.se

This was fixed some time in 2009

Note: See TracTickets for help on using tickets.