Показать сообщение отдельно
  #3  
Старый 28.09.2015, 08:59
mefisto74 mefisto74 вне форума
Прохожий
 
Регистрация: 28.09.2015
Сообщения: 2
Версия Delphi: Delphi 7
Репутация: 10
По умолчанию

Код:
procedure FnegativeTemp(var Fx:RealFile);
var
i:integer;
Ntemp:real;
NArray:array[1..20] of real;
begin
assign(Fx,'temp.dat');
reset(Fx);

for i:=1 to FileSize(Fx) do begin
read(Fx,Ntemp);
seek(fx,FileSize(Fx));

if Ntemp<0 then begin
Narray[i]:=Ntemp;
write(Fx,Narray[i]);
seek(Fx,i);
end;

end;
  close(Fx);
end;       

как-то так, файл уже существует и в нем 10 чисел
Ответить с цитированием