Добавил:
Upload
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Все лабораторные работы по паскалю / 6 лаб. Файлы типизированные / Program4
.pas uses crt;
type moi_tip=record
FAM: string [15];
IM: char;
OCH: char;
POL: boolean;
LET: byte;
end;
var rec,sor:array [1..4] of moi_tip;
i,j: byte;
tipf: file of moi_tip;
begin
Assign(tipf,'1.txt');
reset(tipf);
while not eof(tipf) do
begin
inc(j);
read (tipf,rec[j]);
end;
close(tipf);
Assign(tipf,'1.txt');
rewrite(tipf);
for i:=1 to j do
if (rec[i].POL)=true then
write(tipf,rec[i]);
close(tipf);
end.
type moi_tip=record
FAM: string [15];
IM: char;
OCH: char;
POL: boolean;
LET: byte;
end;
var rec,sor:array [1..4] of moi_tip;
i,j: byte;
tipf: file of moi_tip;
begin
Assign(tipf,'1.txt');
reset(tipf);
while not eof(tipf) do
begin
inc(j);
read (tipf,rec[j]);
end;
close(tipf);
Assign(tipf,'1.txt');
rewrite(tipf);
for i:=1 to j do
if (rec[i].POL)=true then
write(tipf,rec[i]);
close(tipf);
end.
Соседние файлы в папке 6 лаб. Файлы типизированные