Показать сообщение отдельно
  #1  
Старый 03.01.2011, 02:16
juggle juggle вне форума
Прохожий
 
Регистрация: 12.12.2010
Сообщения: 24
Репутация: -20
Лампочка Ошибка: Left side cannot be assigned to

Мне необходимо считать матрицу с .txt фаила. Программа написана, но падает с ошибкой Left side cannot be assigned to. Знаю, что дело в какой-то property, у которой надо снаять ReadOnly. Но у какой?
Помогите ее найти.

Код:
procedure TForm1.Button2Click(Sender: TObject);

  var
  i,j:integer;
  input: textfile;

begin
 if not OpenDialog1.Execute then exit;
 AssignFile(input,OpenDialog1.FileName);
 Reset(input);

 i:=0;
 while not EOF(input) do
  begin
   j:=0;
   while not EOLN(input) do
    begin
     Read(input,StringGrid1.cells[i,j]); /// The Error Here!!!
      inc(j);
      stringGrid1.ColCount := j+1;
    end;
    inc(i);
    stringGrid1.RowCount := i+1;
    readln(input);
  end;
  closefile(input);
  end;
Ответить с цитированием