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#2457 - OpenModelica/OpenModelica-testsuite#959
- Loading branch information
1 parent
74a7737
commit 62a0cb4
Showing
3 changed files
with
63 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,34 @@ | ||
// name: ForEquation6 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
model ForEquation6 | ||
Real x[3]; | ||
Real y[3]; | ||
equation | ||
for i in 1:3 loop | ||
x[i] = i; | ||
y[i] = i; | ||
end for; | ||
end ForEquation6; | ||
|
||
// Result: | ||
// class ForEquation6 | ||
// Real x[1]; | ||
// Real x[2]; | ||
// Real x[3]; | ||
// Real y[1]; | ||
// Real y[2]; | ||
// Real y[3]; | ||
// equation | ||
// x[1] = 1.0; | ||
// y[1] = 1.0; | ||
// x[2] = 2.0; | ||
// y[2] = 2.0; | ||
// x[3] = 3.0; | ||
// y[3] = 3.0; | ||
// end ForEquation6; | ||
// 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
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,27 @@ | ||
// name: When4 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
model When4 | ||
Real x, y; | ||
equation | ||
when time > 0 then | ||
x = 1; | ||
y = 2; | ||
end when; | ||
end When4; | ||
|
||
// Result: | ||
// class When4 | ||
// Real x; | ||
// Real y; | ||
// equation | ||
// when time > 0.0 then | ||
// x = 1.0; | ||
// y = 2.0; | ||
// end when; | ||
// end When4; | ||
// endResult |