Мне необходимо считать матрицу с .txt фаила. Программа написана, но падает с ошибкой Left side cannot be assigned to. Знаю, что дело в какой-то property, у которой надо снаять ReadOnly. Но у какой?
Помогите ее найти.
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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
<b>Read(input,StringGrid1 . cells[i,j])</b>;
inc(j);
stringGrid1 . ColCount := j+ 1 ;
end ;
inc(i);
stringGrid1 . RowCount := i+ 1 ;
readln(input);
end ;
closefile(input);
end ;
|