Ticket #1257: block_test.mo

File block_test.mo, 466 bytes (added by jlettau, 14 years ago)
Line 
1block foo
2 input Integer foo1[:];
3 input Integer foo2[:];
4 output Real result[size(foo1,1)];
5 algorithm
6 for i in 1:size(foo1,1) loop
7 if foo1[i] >= foo2[i] then
8 result[i] := 7.0;
9 else
10 result[i] := 8.0;
11 end if;
12 end for;
13end foo;
14
15model mod
16 parameter Integer mod1[:]={1,1,1};
17 parameter Integer mod2[:]={2,0,0};
18 Real result[size(mod1,1)];
19 foo f1(foo1=mod1, foo2=mod2);
20 equation
21 result = f1.result;
22end mod;