procedure
TForm1
.
BitBtn1Click(Sender: TObject);
Var
i,j,n :
integer
;
s,st:
String
;
begin
if
OpenDialog1
.
Execute=
true
then
begin
ListBox1
.
Items
.
Clear;
ListBox1
.
Items
.
LoadFromFile(OpenDialog1
.
FileName);
StringGrid1
.
RowCount:=ListBox1
.
Items
.
Count;
for
i:=
0
to
ListBox1
.
Items
.
Count-
1
do
begin
s:=ListBox1
.
Items[i];
st:=
''
;j:=
1
;
Repeat
st:=st+s[j]; j:=j+
1
;
Until
(s[j]=
';'
);
StringGrid1
.
Cells[
0
,i+
1
]:=st;
j:=j+
1
;st:=
''
;
Repeat
st:=st+s[j]; j:=j+
1
;
Until
(s[j]=
'|'
);
StringGrid1
.
Cells[
1
,i+
1
]:=st;
j:=j+
1
;st:=
''
;
Repeat
st:=st+s[j]; j:=j+
1
;
Until
(s[j]=
'|'
);
StringGrid1
.
Cells[
2
,i+
1
]:=st;
j:=j+
1
;st:=
''
;
Repeat
st:=st+s[j]; j:=j+
1
;
Until
(s[j]=
')'
);
StringGrid1
.
Cells[
3
,i+
1
]:=st;
j:=j+
1
;st:=
''
;
end
;
end
;