
12.05.2013, 21:49
|
 |
LMD-DML
|
|
Регистрация: 12.07.2009
Адрес: Богородское
Сообщения: 3,025
Версия Delphi: D7E
Репутация: 1834
|
|
Наверное так
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
q,w,e:TStrings;
i: integer;
begin
q:= TStringList.Create;
w:= TStringList.Create;
e:= TStringList.Create;
with Memo1.Lines do
for i:=0 to Count-1 do
begin
q.DelimitedText:= Strings[i];
if q.count>5 then w.values[q[0]]:= IntToStr(StrToIntDef(w.values[q[0]],0)+ StrToInt(q[4]));
if q.count>6 then e.values[q[0]]:= IntToStr(StrToIntDef(e.values[q[0]],0)+ StrToInt(q[5]));
end;
Label1.Caption:=w.Text;
Label2.Caption:=e.Text;
q.Free;
w.Free;
e.Free;
end;
|