Показать сообщение отдельно
  #9  
Старый 05.03.2013, 21:48
Аватар для Uniq!
Uniq! Uniq! вне форума
Местный
 
Регистрация: 29.09.2010
Сообщения: 539
Версия Delphi: Delphi XE3
Репутация: 374
По умолчанию

Код:
procedure EMNPGraph.LoadFromFile(const FileName: TFileName);
var
 tFile : TextFile;
 tmp : string;
begin
AssignFile(tFile,FileName);
 Reset(tFile);
 while not EoF(tFile) do
  begin
  SetLength(gX,length(gX)+1);
  SetLength(gY,length(gY)+1);

  ReadLn(tFile,tmp);
  tmp:=trim(tmp);

  gX[length(gX)-1] := StrToInt(Copy(tmp,0,Pos(' ',tmp)-1));
  Delete(tmp,1,Pos(' ',tmp)-1);
  gY[length(gY)-1] := StrToInt(Trim(tmp));
  end;
 CloseFile(tFile);
gLength := length(gX)-1;
end;
Ответить с цитированием