Codegen Error for strings in zero-crossings
For example, the following model fails with code generation issue, since strings are not escaped in the c code.
loadString("
model test
function compare
input String string1;
input String string2;
input Boolean caseSensitive=true;
output Boolean result;
external \"C\" result = ModelicaStrings_compare(string1, string2, caseSensitive) annotation(Library=\"ModelicaExternalC\");
end compare;
Real x;
equation
der(x) = if compare(\"test\",\"Test\",false) and x > 0.5 then 0.5 else 1.0;
end test;
");
simulate(test);
getErrorString();
Change History
(4)
Owner: |
changed from Lennart Ochel to Willi Braun
|
Status: |
new → accepted
|
Resolution: |
→ fixed
|
Status: |
accepted → closed
|
Milestone: |
Future → pre1.9.4
|
Milestone: |
pre1.9.4 → 1.9.4
|
fixed in r22173.