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
Showing
2 changed files
with
21 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,20 @@ | ||
// status: incorrect | ||
|
||
model ArrayRange | ||
Real x[4, 2]; | ||
algorithm | ||
for elem in {{1, 2}, {3, 4}, {5, 6}, {7, 8}} loop | ||
x[div(elem[2], 2), :] := elem; | ||
end for; | ||
end ArrayRange; | ||
|
||
// Result: | ||
// Error processing file: ArrayRange.mo | ||
// [flattening/modelica/algorithms-functions/ArrayRange.mo:6:3-8:10:writable] Error: Iterator elem, has type Integer[4, 2], but expected a 1D array expression. | ||
// Error: Error occurred while flattening model ArrayRange | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// 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