Opened 11 years ago
Closed 11 years ago
#2300 closed defect (fixed)
empty array
Reported by: | Lennart Ochel | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
The following model works fine:
model emptyArray1 parameter Integer N = 0; Real r1[N]; Real r2[N]; equation r1 = fill(1.0, N); equation r2 = r1; end emptyArray1;
The model fails if the second equation get replaced with an algorithm:
model emptyArray2 parameter Integer N = 0; Real r1[N]; Real r2[N]; equation r1 = fill(1.0, N); algorithm r2 := r1; end emptyArray2;
InstantiateModel produces the following code for model emptyArray2:
class emptyArray2 parameter Integer N = 0; algorithm r2 := {}; end emptyArray2;
The problem is that there occurs a variable without definition (r2
).
Change History (3)
comment:1 by , 11 years ago
Priority: | high → blocker |
---|
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Yeah, for an equation we do remove it if it involves a zero array.
It seems we do not do the same for algorithms.
I'll have a look.
Note:
See TracTickets
for help on using tickets.
This blocks the Petri net library.