-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestcase7.txt
More file actions
33 lines (31 loc) · 728 Bytes
/
testcase7.txt
File metadata and controls
33 lines (31 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
_swapints
input parameter list [int b2b, int b2c]
output parameter list[int c2b, int c2c];
c2b<---b2c;
c2c<---b2b;
return [c2b, c2c];
end
_swaprecs
input parameter list [record #rec d5b, record #rec d2c]
output parameter list[record #rec d5c, record #rec d2b];
type int : b3;
[b3,b3]<--- call _swapints with parameters [b3,b3];
[d5d,d2b]<--- call _swapints with parameters [b3, d5c];
return [d2d, d2b];
end
_main
record #rec
type int : len;
type int : height;
endrecord;
type record #rec : b2;
type record #rec : d5b: global;
b2.len<---5;
b2.height <---7;
d5b.len <---10.56;
d5b.height <---20;
[b2, c2]<--- call _swaprecs with parameters [b2,d5b];
write(b2);
write(c2);
return;
end