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#1990 - OpenModelica/OpenModelica-testsuite#768
- Loading branch information
1 parent
9a9ebb6
commit 1bb9816
Showing
3 changed files
with
58 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,27 @@ | ||
// name: IfEquation1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model IfEquation1 | ||
Real x; | ||
equation | ||
if time > 1 then | ||
x = 1.0; | ||
else | ||
x = 2.0; | ||
end if; | ||
end IfEquation1; | ||
|
||
// Result: | ||
// class IfEquation1 | ||
// Real x; | ||
// equation | ||
// if time > 1.0 then | ||
// x = 2.0; | ||
// else | ||
// x = 1.0; | ||
// end if; | ||
// end IfEquation1; | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// name: IfEquation2 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model IfEquation2 | ||
Real x; | ||
parameter Boolean b; | ||
equation | ||
if b then | ||
x = 1.0; | ||
else | ||
x = 2.0; | ||
end if; | ||
end IfEquation2; | ||
|
||
// Result: | ||
// class IfEquation2 | ||
// Real x; | ||
// parameter Boolean b; | ||
// equation | ||
// if b then | ||
// x = 2.0; | ||
// else | ||
// x = 1.0; | ||
// end if; | ||
// end IfEquation2; | ||
// 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