
20.08.2010, 21:19
|
 |
Активный
|
|
Регистрация: 24.04.2010
Адрес: Украина, Кременчуг
Сообщения: 249
Репутация: 22
|
|
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
i,b,e:integer;
begin
b:=0;
e:=0;
for i:=0 to memo1.Lines.Count-1 do
begin
if pos('end',memo1.Lines[i])<>0 then inc(e);
if pos('begin',memo1.Lines[i])<>0 then inc(b);
end;
showmessage('Begin count= '+inttostr(b)+' end count= '+inttostr(e));
end;
__________________
Не твори зла, и жизнь повернется к тебе передом
|