Opened 10 years ago
Last modified 10 years ago
#3173 closed defect
Array index not detected as integer — at Version 1
Reported by: | Henning Kiel | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
The following model does not flatten:
model demo Real x[8] = {1, 2, 3, 4, 5, 6, 7, 8}; Real y; algorithm y := 0; for j in 1:3 loop y := y + x[j * (j + 1) / 2]; end for; end demo;
[demo.mo:7:5-7:32:writable] Error: Subscript j * (j + 1) / 2 of type Real is not a subtype of Integer, Boolean or enumeration. [demo.mo:7:5-7:32:writable] Error: Variable x[j * (j + 1) / 2] not found in scope demo.$for loop scope$. Error: Error occurred while flattening model demo
Note:
See TracTickets
for help on using tickets.