5 function stri (n
,n1
:integer;zero
,trim
:boolean):string;
6 function strL (n
: longint; n1
:integer):string;
8 {function strr(n:real;n1,n2:word):string;
9 function strH (w : longint; c : word) : string;}
10 function strhl(w
: longint; c
: word) : string;
11 function hexi(s
:string):word;
12 function hexl(s
:string):longint;
13 function inti(s
:string):word;
14 {function intl(s:string):longint; }
20 function atrim(s
: string) : string;
24 while (t
[1] = ' ') and (length(t
) > 0) do t
:= copy(t
, 2, 255);
25 while (t
[length(t
)] = ' ') and (length(t
) > 0) do t
:= copy(t
, 1, length(t
) - 1);
31 const a:array[0..15] of cHar =
32 ('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
35 if c>0 then r:=strh(w div 16,c-1)+a[w mod 16]
41 const a
:array[0..15] of cHar =
42 ('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
46 if w
mod 16 >= 0 tHen r
:= strhl(w
sHr 4, c
- 1) + a
[ w
mod 16] else
47 r
:= strHl(w
sHr 4, c
- 1) + a
[16 + w
mod 16]
53 const a
: string[15] ='123456789ABCDEF';
58 for i
:=1 to length(s
) do begin
59 if S
[i
]<>' ' then begin
61 h
:=h
+pos(UpCase(S
[i
]),a
);
68 const a
: string[15] ='123456789ABCDEF';
73 for i
:=1 to length(s
) do begin
74 if S
[i
]<>' ' then begin
76 h
:=h
+pos(UpCase(S
[i
]),a
);
107 for i
:= 1 to lengtH(s
) do
108 if s
[i
] = ' ' THen s
[i
] := '0';
110 if trim
then s
:= atrim(s
);