Контрольная работа: Упорядочивание элементов файла
i, n: integer;
c: char;
begin
FillRecArr:= 0;
i:= 0;
while i < MaxRecCount do
begin
c:= #0;
WriteLn('Do you want insert new record in list?(y/n)');
c:= ReadKey;
if (c in ['n', 'N', #27]) then Break;
ClrScr;
Inc(i);
Write('Please get Pay #', i, ' :');
ReadLn(RecArr[i].ChetPlatel);
Write('Please get Dest #', i, ' :');
ReadLn(RecArr[i].ChetPoluch);
repeat
Write('Please get summ :');
{$I-}
ReadLn(RecArr[i].SummaPlateja);
{$I+}
n:= IOResult;
if n <> 0 then
WriteLn('The summ is fault.Try again.');
until n = 0;
ClrScr
end;
FillRecArr:= i;