5 function points(d
: boolean; t
: string; m
: integer): string;
6 function toreal(r
: string): real;
7 function rtostr(r
: real): string;
8 function plslop(o
, c
: string; back
, buys
: boolean): string;
9 function plslom(o
, c
: string; back
, buys
: boolean; size
, amnt
, intr
: string): string;
10 function chkprc(o
, c
, q
, b
: string): boolean;
22 if pos('.', s
) = 0 then s
:= s
+ '.';
23 while length(s
) < 6 do s
:= s
+ '0';
25 s
:= copy(s
, 1, p
- 1) + copy(s
, p
+ 1, 6 - p
);
27 if d
then inc(i
, m
) else dec(i
, m
);
29 while length(s
) < 5 do s
:= '0' + s
;
30 s
:= copy(s
, 1, p
- 1) + '.' + copy(s
, p
, 6 - p
);
34 function toreal(r
: string): real;
41 if (i
> 0) and (I
< length(S
)) then begin
42 if S
[I
] = '.' then S
[I
] := ',' else
43 if S
[I
] = ',' then S
[i
] := '.';
68 if back
xor buys
then j
:= -j
;
69 plslop
:= inttostr(j
);
79 if (op
= 0) or (cl
= 0) then exit
;
80 if back
then dd
:= cl
- op
81 else dd
:= 1/op
- 1/cl
;
82 dd
:= dd
* toreal(size
);
83 if back
xor buys
then dd
:= -dd
;
84 dd
:= dd
* strtoint(amnt
) - toreal(intr
);
94 bk
:= (q
= 'EUR') or (q
= 'GBP');
96 chkprc
:= (op
>= cl
) xor (bk
xor sb
);