source: liacs/coco/tests/code-generation/temps1.p0@ 276

Last change on this file since 276 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 349 bytes
Line 
1program k;
2
3function test(i: integer): integer;
4
5var hlp1, hlp2: integer;
6begin
7 writeinteger(i);
8 if (i > 1) then
9 begin
10 hlp1 := test(i-1);
11 hlp2 := test(i-1);
12 writeinteger(-hlp1);
13 writeinteger(-hlp2);
14 test := hlp1 + hlp2
15 end
16 else
17 begin
18 writeinteger(-1);
19 test := 1
20 end
21end;
22
23begin
24 writeinteger(test(4))
25end.
Note: See TracBrowser for help on using the repository browser.