function Analiz(l:String):String;
var
f,f1 :textfile;
i,j,j1 :integer;
s,g,g0,s0,s1,s2,s3,a,k,m,s4,s5,s6,s7 : String; begin
AssignFile(f,'f:\sample\'+l);
// открывает каждый файл для анализа
Reset (f);
while not Eof (f) do
begin
readln(f,s);
s0:='';
if length (s) >=3 then
for i:=1 to 3 do s0:=s0+s[i];
if s0 = 'QSO' then
begin
s1:= '';
s1:= s[55]+s[56]+s[57]+s[58]+s[59]+s[60]+s[61]; //позывной корреспондента
a:= Trim(s1); // Функция удаления пробелов
s3:= '';
s3:= s[30]+s[31]+s[32]+s[33]+s[34]+s[35]+s[36]; //свой позывной
k:= 'f:\sample\'+a+'.cbr';
m:= 'f:\sample\'+ Trim(s3)+'.cbr';
s4:= Trim(s[44]+s[45]+s[46]+s[47]+s[48]+s[49]+s[50]+s[51]+s[55]); // номер переданный
s5:= Trim(s[69]+s[70]+s[71]+s[72]+s[73]+s[74]+s[75]+s[76]+s[77]+s[78]+s[79]+s[80]); // номер принятый
s6:= s[26]+s[27]+':'+s[28]+s[29]; // Время
s7:= Trim(s[6]+s[7]+s[8]+s[9]+s[10]);
form1.ListBox1.Items.Add (s1);
form2.Label2.Caption := IntToStr(i1);
form1.stringgrid1.Cells[2,i1]:= k;
form1.stringgrid1.Cells[1,i1]:= s1;
form1.stringgrid1.Cells[3,i1]:= s3;
form1.stringgrid1.Cells[4,i1]:= m;
form1.stringgrid1.Cells[5,i1]:= s4;
form1.stringgrid1.Cells[6,i1]:= s5;
form1.stringgrid1.Cells[7,i1]:= s6;
i1:=i1+1;
form1.StringGrid1.RowCount:= i1;
Result:= 'String';
end;
end;
CloseFile (f);
end;
--------------------------------------------------------------------------------------------------------
Эта функция заносит значения в таблицу значения из отчета.