
16.05.2008, 13:12
|
|
Познавший АНТИЧАТ
Регистрация: 26.11.2004
Сообщений: 1,367
С нами:
11291486
Репутация:
2175
|
|
Код:
const
podstroka = '*Mitiay';
var
f, sorted: textfile;
procedure Parse(s: string);
begin
if strpos(PChar(s), podstroka) <> nil then
writeln(sorted, s);
end;
begin
path := ExtractFilePath(ParamStr(0));
assignfile(f, path + 'file.txt');
assignfile(sorted, path + 'file_sorted.txt');
reset(f);
rewrite(sorted);
while not eof(f) do
begin
readln(f, s);
Parse(s);
end;
closefile(f);
closefile(sorted);
|
|
|