]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.pascal/integers.pas
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.pascal / integers.pas
CommitLineData
2d8fd90a 1{
8acc9f48 2 Copyright 2008-2013 Free Software Foundation, Inc.
2d8fd90a
PM
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16}
17
18program integers;
19
20
21function add(a,b : integer) : integer;
22begin
23 add:=a+b;
24end;
25
26function sub(a,b : integer) : integer;
27begin
28 sub:=a-b;
29end;
30
31var
32 i, j, k, l : integer;
33
34begin
35 i := 0;
36 j := 0;
37 k := 0;
38 l := 0; { set breakpoint 1 here }
39 i := 1;
40 j := 2;
41 k := 3;
42 l := k;
43
44 i := j + k;
45
46 j := 0; { set breakpoint 2 here }
47 k := 0;
48 l := add(i,j);
49 l := sub(i,j);
50
51end.