-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.pas
More file actions
37 lines (28 loc) · 725 Bytes
/
lib.pas
File metadata and controls
37 lines (28 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
unit Lib;
// Lib is an example of a unit that has some functions we want to test. The
// unit LibTest contains the unit-tests for these functions.
{$LONGSTRINGS ON}
{$MODE OBJFPC}
interface
function addTen(value: integer): integer;
function concatStrings(first, second: string): string;
function returnsOnePointZero(): real;
function returnsTen(): integer;
implementation
function addTen(value: integer): integer;
begin
Result := value + 10
end;
function concatStrings(first, second: string): string;
begin
Result := first + second
end;
function returnsOnePointZero(): real;
begin
Result := 1.0
end;
function returnsTen(): integer;
begin
Result := 10
end;
end.