Opened 11 years ago
Closed 11 years ago
#2399 closed defect (fixed)
array assignment does not work properly
Reported by: | Adeel Asghar | Owned by: | Willi Braun |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.1 |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Lennart Ochel, Willi Braun |
Description
Create a libmylib.a from mylib.c file,
gcc -c mylib.c -o mylib.o ar rcs libmylib.a mylib.o
Copy the lib to trunk/build/lib/.
Run the attached model.
Check the attached output file. Note that the value of outputs2[1] is zero whereas it should be same as outputs[1].
In the model the equation for getting the values of outputs1 array is,
(outputs1) := calculate1(step, size(outputs1, 1));
and for outputs2 array is,
(outputs2, done) := calculate2(step, size(outputs2, 1));
the only difference is that for outputs2 an additional output done is specified. The code works fine if only one output is used.
There are two functions in the mylib.c file but both are doing the same thing.
Attachments (5)
Change History (11)
by , 11 years ago
by , 11 years ago
by , 11 years ago
comment:1 by , 11 years ago
Priority: | high → blocker |
---|
comment:2 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
I believe this is a duplicate of #2352
comment:3 by , 11 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:5 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | reopened → assigned |
1: done:DISCRETE() .foo, .Integer type: Integer 2: outputs2[2]:DISCRETE() .foo, .Real type: Real [2] 3: outputs2[1]:VARIABLE() .foo, .Real type: Real [2] 4: outputs1[2]:DISCRETE() .foo, .Real type: Real [2] 5: outputs1[1]:DISCRETE() .foo, .Real type: Real [2] 6: $whenCondition1:DISCRETE(fixed = true ) type: Boolean
output2 gets not marked as discrete variable.
Model