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#2054 - OpenModelica/OpenModelica-testsuite#794
- Loading branch information
1 parent
7befa22
commit 40c6cc0
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
flattening/modelica/scodeinst/ExternalFunctionExplicit2.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// name: ExternalFunctionExplicit2 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
function f | ||
input Real x[3]; | ||
output Real y; | ||
external "C" y = ext(x, size(x, 1)); | ||
end f; | ||
|
||
model ExternalFunctionExplicit2 | ||
Real x; | ||
algorithm | ||
x := f({1.0, 2.0, 3.0}); | ||
end ExternalFunctionExplicit2; | ||
|
||
// Result: | ||
// function f | ||
// input Real[3] x; | ||
// output Real y; | ||
// | ||
// external "C" y = ext(x, 3); | ||
// end f; | ||
// | ||
// class ExternalFunctionExplicit2 | ||
// Real x; | ||
// algorithm | ||
// x := f({1.0, 2.0, 3.0}); | ||
// end ExternalFunctionExplicit2; | ||
// 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