Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Belonging to [master]: - OpenModelica/OMCompiler#2518 - OpenModelica/OpenModelica-testsuite#980
- Loading branch information
1 parent
fb83712
commit d023d7a
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// name: IfEquation5 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model IfEquation5 | ||
Real x[2]; | ||
parameter Boolean p[2] = {false, true}; | ||
equation | ||
x[1] = 1; | ||
for i in 1:2 loop | ||
if p[i] then | ||
x[i] = 2; | ||
end if; | ||
end for; | ||
end IfEquation5; | ||
|
||
// Result: | ||
// class IfEquation5 | ||
// Real x[1]; | ||
// Real x[2]; | ||
// parameter Boolean p[1] = false; | ||
// parameter Boolean p[2] = true; | ||
// equation | ||
// x[1] = 1.0; | ||
// x[2] = 2.0; | ||
// end IfEquation5; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters