Ticket #6352: TestFunctionRecordArray.mo
| File TestFunctionRecordArray.mo, 326 bytes (added by , 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | model 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; |
| 19 | equation |
| 20 | x = time; |
| 21 | r = f(x); |
| 22 | end TestFunctionRecordArray; |
