uses crt;
procedure deleting(infile,outfile, word:string);
var f_,v:text; st,wt:string; chars:set of char;i:byte;
begin
chars:=['a'..'z'];
assign(f_,infile);
reset(f_);
assign(v,outfile);
rewrite(v);
while not eof(f_) do begin
readln(f_,st);
i:=1;
repeat
while not (st[i] in chars) and (i<=length(st)) do inc(i);
wt:='';
while (st[i] in chars) and (i<=length(st)) do
begin
wt:=wt+st[i];
inc(i);
end;
if length(wt)<>0 then writeln(v,wt);
until (i>length(st))
end;
close(f_);
close(v);
reset(v);
while not eof(v) do
begin
readln(v,st);
if st=word then delete(st,1,length(word));
end;
close(v);
reset(v);
end;
var word1,st1,filename:string; f:text;
begin
write('word: ');
readln(word1);
writeln('from <f>ile?');
if (readkey='f') then
begin
write('filename: ');
readln(filename)
end else
begin
assign(f,'d:\bin\b.dat');
rewrite(f);
writeln('input text');
repeat
readln(st1);
if st1<>'' then writeln(f,st1);
until st1='';
close(f);
filename:='d:\bin\b.dat';
end;
deleting(filename,'d:\bin\res.dat',word1);
assign(f,'d:\bin\res.dat');
reset(f);
while not eof(f) do
begin
readln(f,st1);
writeln(st1);
end;
end.
Код ставим в теги...