Ticket #6352: TestFunctionRecordArray.mo

File TestFunctionRecordArray.mo, 326 bytes (added by Francesco Casella, 5 years ago)
Line 
1model TestFunctionRecordArray
2 constant Integer c = 3;
3
4 record R
5 Real v;
6 Real x[c];
7 end R;
8
9 function f
10 input Real v;
11 output R rout;
12 algorithm
13 rout.v := v;
14 rout.x := {0.3, 0.4, 0.3};
15 end f;
16
17 Real x;
18 R r;
19equation
20 x = time;
21 r = f(x);
22end TestFunctionRecordArray;