Opened 13 years ago
Last modified 13 years ago
#1674 closed defect (fixed)
function sum with reductions does not work: {sum(myArray[1:i]) for i in 1:dimensions}
Reported by: | Fritz Zaversky | Owned by: | Fritz Zaversky |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Fritz Zaversky, |
Description
{{{model OMtest
parameter Integer dimensions = 5;
parameter Real myArray[dimensions] = {1,2,3,4,5};
parameter Real mySumArray[dimensions] = {sum(myArray[1:i]) for i in 1:dimensions};
end OMtest;}}}
following error:
{{{[SimCodeC.tpl:5647:11-5647:11:writable] Error: Template error: ASUB_EASY_CASE 1:1
[SimCodeC.tpl:5647:11-5647:11:writable] Error: Template error: ASUB_EASY_CASE 1:2
[SimCodeC.tpl:5647:11-5647:11:writable] Error: Template error: ASUB_EASY_CASE 1:3
[SimCodeC.tpl:5647:11-5647:11:writable] Error: Template error: ASUB_EASY_CASE 1:4}}}
Note:
See TracTickets
for help on using tickets.
Interestingly, the following also does not work:
{{{model OMtest
end OMtest;}}}