#2808 closed defect (fixed)
Codegen Error for strings in zero-crossings
| Reported by: | Willi Braun | Owned by: | Willi Braun |
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.4 |
| Component: | Code Generation | Version: | trunk |
| Keywords: | Cc: |
Description
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)
comment:1 by , 11 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → accepted |
comment:2 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Version 0, edited 11 years ago by (next)
comment:3 by , 10 years ago
| Milestone: | Future → pre1.9.4 |
|---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:4 by , 8 years ago
| Milestone: | pre1.9.4 → 1.9.4 |
|---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Note:
See TracTickets
for help on using tickets.
