source: liacs/coco/tests/semantic-checks/dirty.p1@ 218

Last change on this file since 218 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: 522 bytes
RevLine 
[2]1program fibonee;
2
3var
4 hlp: integer;
5
6function fibo(i: integer): integer;
7
8begin
9 if (i <= 1) then
10 fibo := 1
11 else
12 fibo := fibo(i-1) + fibo(i-2)
13end;
14
15function plus(i: integer): integer;
16
17begin
18 plus := i + 1
19end;
20
21function geennaam(i: integer): integer;
22
23begin
24 if (geennaam > 0) then { geennaam is used as function call without parameter}
25 geennaam := 1 + geennaam(i-1)
26 else
27 geennaam := 0
28end;
29
30begin
31 hlp := fibo(7);
32 writeinteger(hlp);
33 writeinteger(plus(4));
34 writeinteger(geennaam(6))
35end.
Note: See TracBrowser for help on using the repository browser.