source: liacs/coco/tests/simple/correct2.p0@ 236

Last change on this file since 236 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: 373 bytes
Line 
1{This is a correct program; it is intended to test that the lexical
2 analyzer correctly skips comment}
3
4program example;
5
6var x, y: integer;
7function gcd(a,b: {Yabadabbadooh!} integer): integer;
8begin
9 if b = 0 then{tokensep}gcd := a
10 else gcd := gcd(b, a mod b {Viva Euclid})
11end;
12
13begin
14 x := readinteger;
15 y := readinteger;
16 writeinteger(gcd(x, y))
17end.
Note: See TracBrowser for help on using the repository browser.