-
Notifications
You must be signed in to change notification settings - Fork 1
/
u02.pas
55 lines (40 loc) · 1.01 KB
/
u02.pas
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
unit u02;
interface
type
TParamValue = class
public
paramName: string;
paramValueInt: Integer;
paramValueString: String;
paramType: Integer; // 0 = INT , 1 = String , 2 = Float , 3 = Boolean
paramValueBoolean: Boolean;
paramValueFloat: double;
procedure SetValueInt(value: Integer);
function GetValueInt(): Integer;
end;
function _FloatToStr(value: double):string;
function _StrToFloat(value: string):double;
const REPORT_INT = 0;
REPORT_STRING = 1;
REPORT_FLOAT = 2;
REPORT_BOOLEAN = 3;
implementation
uses System.SysUtils;
procedure TParamValue.SetValueInt(value: Integer);
begin
paramValueInt := value;
paramValueString := IntToStr(value);
end;
function TParamValue.GetValueInt(): Integer;
begin
result := paramValueInt;
end;
function _FloatToStr(value: double):string;
begin
result := FloatToStr(value);
end;
function _StrToFloat(value: string):double;
begin
result := StrToFloat(value);
end;
end.