Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea9199b
commit 91a80a7
Showing
20 changed files
with
157 additions
and
112 deletions.
There are no files selected for viewing
15 changes: 7 additions & 8 deletions
15
flattening/modelica/scodeinst/bindings2.mo → ...ening/modelica/scodeinst/BindingArray1.mo
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
// name: bindings2.mo | ||
// name: BindingArray1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// cflags: -d=newInst | ||
// | ||
|
||
|
||
model A | ||
Real x; | ||
Real x = 1.0; | ||
end A; | ||
|
||
model B | ||
model BindingArray1 | ||
A a[3](x = {1, 2, 3}); | ||
end B; | ||
end BindingArray1; | ||
|
||
// Result: | ||
// class B | ||
// class BindingArray1 | ||
// Real a[1].x = 1.0; | ||
// Real a[2].x = 2.0; | ||
// Real a[3].x = 3.0; | ||
// end B; | ||
// end BindingArray1; | ||
// 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,21 @@ | ||
// name: BindingArray2 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model A | ||
Real x = 1.0; | ||
end A; | ||
|
||
model BindingArray2 | ||
A a[3](each x = 2.0); | ||
end BindingArray2; | ||
|
||
// Result: | ||
// class BindingArray2 | ||
// Real a[1].x = 2.0; | ||
// Real a[2].x = 2.0; | ||
// Real a[3].x = 2.0; | ||
// end BindingArray2; | ||
// 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,28 @@ | ||
// name: BindingArray3 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model A | ||
Real x = 1.0; | ||
end A; | ||
|
||
model B | ||
A a[3]; | ||
end B; | ||
|
||
model BindingArray3 | ||
B b[2](each a(x = {2, 3, 4})); | ||
end BindingArray3; | ||
|
||
// Result: | ||
// class BindingArray3 | ||
// Real b[1].a[1].x = 2.0; | ||
// Real b[1].a[2].x = 3.0; | ||
// Real b[1].a[3].x = 4.0; | ||
// Real b[2].a[1].x = 2.0; | ||
// Real b[2].a[2].x = 3.0; | ||
// Real b[2].a[3].x = 4.0; | ||
// end BindingArray3; | ||
// 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,28 @@ | ||
// name: BindingArray4 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model A | ||
Real x = 1.0; | ||
end A; | ||
|
||
model B | ||
A a[3]; | ||
end B; | ||
|
||
model BindingArray4 | ||
B b[2](each a.x = 2); | ||
end BindingArray4; | ||
|
||
// Result: | ||
// class BindingArray4 | ||
// Real b[1].a[1].x = 2.0; | ||
// Real b[1].a[2].x = 2.0; | ||
// Real b[1].a[3].x = 2.0; | ||
// Real b[2].a[1].x = 2.0; | ||
// Real b[2].a[2].x = 2.0; | ||
// Real b[2].a[3].x = 2.0; | ||
// end BindingArray4; | ||
// 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
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
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
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
Oops, something went wrong.