При запуске процедуры вылетает ошибка --------------------------- Project Shfr.exe raised exception class EConvertError with message '' ---------------------------
| Код | procedure TForm1.Button2Click(Sender: TObject); var i,x,y,f,n,y1:Integer; stro,stro1,pri:string; begin f:=1; assignfile(t2,'r2.txt'); Reset(t2); assignfile(t3,'r3.txt'); Rewrite(t3); Readln(t2,stro); for i:=0 to 20 do begin if Odd(i) then x:=strtoint(stro[i]) else y:=strtoint(stro[i]);//<проблема здесь f:=f+1; if f=2 then begin f:=1; pri:=StringGrid1.Cells[x,y]; stro1:=stro1+pri; end; end; lbl7.Caption:=(stro1); CloseFile(t2); CloseFile(t3); end;
|
|