Opened 11 years ago

Last modified 11 years ago

#2791 closed defect

Array constructor with several iterators — at Version 4

Reported by: Henrik Tidefelt Owned by: somebody
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description (last modified by Henrik Tidefelt)

This example from version 3.3 of the Modelica specification, section 10.4.1.2 Array constructor with several iterators, does not work:

model Nested
  parameter Integer n = 4;
  Real hilb[:,:]= {(1/(i+j-1)) for i in 1:n, j in 1:n};
end Nested;

Output from the translation:

[CodegenC.tpl:9529:14-9529:14] Error: Template error: Code generation does not support multiple iterators: array(DIVISION(1.0, /*Real*/(i + j + -1)) for j in {1, 2, 3, 4}, i in {1, 2, 3, 4})

Change History (4)

comment:1 by Martin Sjölund, 11 years ago

Resolution: invalid
Status: newclosed

You have unbalanced parenthesis. It should not parse.

comment:2 by Martin Sjölund, 11 years ago

Milestone: Future

comment:3 by Per Östlund, 11 years ago

Reported as #1558.

comment:4 by Henrik Tidefelt, 11 years ago

Description: modified (diff)
Resolution: invalid
Status: closedreopened

Sorry about the missing parentheses in the description. Description corrected.

Note: See TracTickets for help on using tickets.