source: liacs/coco/tests/declarations/undeclared1.p1@ 25

Last change on this file since 25 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: 510 bytes
Line 
1{ This program is correct wrt the context-free grammar; it tests
2 for correct scanning of numerals }
3
4program example;
5
6var x, y: integer;
7function gcd(a,b: integer): integer;
8begin
9 if b <> 0 then gcd := a
10 else gcd := gcd(b, a mod b)
11end;
12
13begin
14 x := readinteger; y := readinteger;
15 writeinteger(gcd(x, y));
16 a := 3;
17 a := 3.5;
18 a := 3E3;
19 a := 2.563E776;
20 a := 1E1;
21 a := 0.150E30;
22 a := -1.3E+13;
23 a := 3.2534E-035;
24 a := -0.02E-30;
25 a := 35E-5;
26 a := a
27end.
Note: See TracBrowser for help on using the repository browser.