Добавил:
bagiwow
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Информатика / 10 / READER
.PAS Uses Crt;
Const
MaxIndex = 10;
Name = 'D:\TP\10\Base.Lab';
Type
Worker = Record
FIO: String[30];
Kafedra,Dolgnost,Razrad: Byte;
Stavka,Oklad,Zarplata: Real;
End;
Var f: Text;
a:array[1..MaxIndex] of Worker;
Procedure Header(s:String);
Begin
ClrScr;
TextColor(Yellow);
GotoXY(35,1); Write(s);
GotoXY(1,3);
TextColor(LightGray);
End;
Procedure Viewing;
Var i: Byte;
Begin
Header('Џа®б¬®ва');
TextColor(Brown);
WriteLn('” ¬Ё«Ёп €¬п ЋвзҐбвў® ':30,
'Љ дҐ¤а „®«¦®бвм ђ §ап¤ ‘в ўЄ ЋЄ« ¤ ‡ аЇ« в ');
TextColor(LightGray);
For i:=1 to MaxIndex Do
With a[i] Do
WriteLn(FIO:30,Kafedra:7,Dolgnost:10,
Razrad:7,Stavka:7:1,Oklad:8:2,Zarplata:8:2);
ReadKey;
End;
Procedure Reading;
Var i: Byte;
Begin
i:= 0;
Repeat
Inc(i);
With a[i] Do Begin
ReadLn(f,FIO);
ReadLn(f,Kafedra,Dolgnost,Razrad,Stavka,Oklad);
End;
Until EOF(f);
End;
Begin
Assign(f,Name);
Reset(f);
Reading;
Viewing;
Close(f);
End.
Const
MaxIndex = 10;
Name = 'D:\TP\10\Base.Lab';
Type
Worker = Record
FIO: String[30];
Kafedra,Dolgnost,Razrad: Byte;
Stavka,Oklad,Zarplata: Real;
End;
Var f: Text;
a:array[1..MaxIndex] of Worker;
Procedure Header(s:String);
Begin
ClrScr;
TextColor(Yellow);
GotoXY(35,1); Write(s);
GotoXY(1,3);
TextColor(LightGray);
End;
Procedure Viewing;
Var i: Byte;
Begin
Header('Џа®б¬®ва');
TextColor(Brown);
WriteLn('” ¬Ё«Ёп €¬п ЋвзҐбвў® ':30,
'Љ дҐ¤а „®«¦®бвм ђ §ап¤ ‘в ўЄ ЋЄ« ¤ ‡ аЇ« в ');
TextColor(LightGray);
For i:=1 to MaxIndex Do
With a[i] Do
WriteLn(FIO:30,Kafedra:7,Dolgnost:10,
Razrad:7,Stavka:7:1,Oklad:8:2,Zarplata:8:2);
ReadKey;
End;
Procedure Reading;
Var i: Byte;
Begin
i:= 0;
Repeat
Inc(i);
With a[i] Do Begin
ReadLn(f,FIO);
ReadLn(f,Kafedra,Dolgnost,Razrad,Stavka,Oklad);
End;
Until EOF(f);
End;
Begin
Assign(f,Name);
Reset(f);
Reading;
Viewing;
Close(f);
End.